From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM autolearn=unavailable autolearn_force=no version=3.4.4 X-Received: by 10.36.204.6 with SMTP id x6mr6187773itf.52.1509943352358; Sun, 05 Nov 2017 20:42:32 -0800 (PST) X-Received: by 10.157.92.195 with SMTP id r3mr257711oti.5.1509943352265; Sun, 05 Nov 2017 20:42:32 -0800 (PST) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!feeder.eternal-september.org!paganini.bofh.team!weretis.net!feeder6.news.weretis.net!feeder.usenetexpress.com!feeder-in1.iad1.usenetexpress.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!k70no819587itk.0!news-out.google.com!193ni2514iti.0!nntp.google.com!l196no825092itl.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Sun, 5 Nov 2017 20:42:31 -0800 (PST) In-Reply-To: <72d8aa16-ed2c-4d17-ae18-10f0be33e81f@googlegroups.com> Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=2601:191:8303:2100:5985:2c17:9409:aa9c; posting-account=fdRd8woAAADTIlxCu9FgvDrUK4wPzvy3 NNTP-Posting-Host: 2601:191:8303:2100:5985:2c17:9409:aa9c References: <9588f435-6437-458d-9a3a-468fc96e0865@googlegroups.com> <72d8aa16-ed2c-4d17-ae18-10f0be33e81f@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: Subject: Re: Array of Unbounded_String vs Indefinite_Vectors(Natural, String) From: Robert Eachus Injection-Date: Mon, 06 Nov 2017 04:42:32 +0000 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Xref: news.eternal-september.org comp.lang.ada:48725 Date: 2017-11-05T20:42:31-08:00 List-Id: On Monday, October 23, 2017 at 12:32:09 PM UTC-4, Shark8 wrote: =20 > As always, consider the problem domain *first* before jumping into code -= - this helps prevent you from falling into the "I have a hammer, so everyth= ing is a nail" mentality -- Ada is really quite good at modeling the proble= m domain for a lot of things, and we should take advantage of that. In the early days of Ada--when working on a compiler before there were any = validated compilers, I said to one of my co-workers: "No! In Ada always mod= el the problem domain. not the solution domain." I then went and wrote it = on my whiteboard. It really is one of the fundamentals of Ada, if not the = fundamental rule. If your model is fitted to a description of the problem = domain, changes in the requirements won't change the world you are modellin= g. In addition, you may/will be able to reuse more of your code to solve o= ther problems in the same domain. Just to make it clear, a component package might require say a hash table. = That's fine, but if you look at how the Ada components are organized, you = can later replace it with a multi-way tree with very little effort. In thi= s case the problem space is some things to be organized, and the hash table= is a solution.=20