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 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,80435549e92d4e0c X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news4.google.com!border1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!news1.optus.net.au!optus!newsfeeder.syd.optusnet.com.au!news.optusnet.com.au!newsfeed.pacific.net.au!nasal.pacific.net.au!not-for-mail Newsgroups: comp.lang.ada Subject: Re: Charles container library usage examples From: David Trudgett Organization: Very little? References: <87mzmssqbq.fsf@ludovic-brenta.org> <4321a2e0_3@newsfeed.slurp.net> Message-ID: User-Agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.4 (gnu/linux) Cancel-Lock: sha1:c3ElW/By0l2HD4alFIsV4ANSDmk= MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Sat, 10 Sep 2005 17:38:15 +1000 NNTP-Posting-Host: 61.8.44.53 X-Complaints-To: news@pacific.net.au X-Trace: nasal.pacific.net.au 1126338168 61.8.44.53 (Sat, 10 Sep 2005 17:42:48 EST) NNTP-Posting-Date: Sat, 10 Sep 2005 17:42:48 EST Xref: g2news1.google.com comp.lang.ada:4561 Date: 2005-09-10T17:38:15+10:00 List-Id: James Alan Farrell writes: >> You can see I ditched the list for a simple array! I already had more >> punishment than I cared for! ;-) I sort of don't mind going to this >> much trouble for the advantages that Ada can give me over, say, Lisp >> (which is what I'm translating from) in terms of execution speed, low >> level control, native concurrency, etc. etc., but it *is* a fair bit >> to replace five lines of unremarkable Lisp! :-) I was thinking that >> the elaborateness of all this must provide a powerful disincentive for >> Ada programmers to use collections/containers. Of course, if you >> really need a collection, then you'll need to go to the trouble to >> have one; but I'm thinking that there must be a whole lot of in >> between cases where, although you can just get by with, say, arrays, >> records, classes, even home-grown linked lists, and so on, it really >> would be better to use the appropriate data structure and >> algorithms. Anyway, that's just me daydreaming. Perhaps someone might >> have something actually sensible to say about these thoughts. > > I'm never sure if my opinions are sensible or not, but... > > All languages have strengths, or they would dissappear through > disuse. Probably true to some (a great?) extent. It also depends a bit on what you call a "strength"! For example, COBOL survives mostly because of the huge momentum behind it, including the massive amount of commercial software written in it. COBOL's "strength" is that it was first to fill the niche! :-) Other languages' strengths include the amount of clout put into their marketing! ;-) (And the concomitant market share this creates.) Of course, they do have to have some other strengths in addition, or they wouldn't be doing as well as they are. So it's not black and white. The other side of the coin is that languages *have* (virtually) disappeared, but not necessarily because they didn't have strengths. I think it is most likely fair to say (though, of course, not a logical deduction) that if languages can disappear for reasons other than their strengths, then other languages can probably linger on despite lack of strengths. > The strengths of different languages must be different or we'd > have just one language. Therefor all languages must also have > (comparative) weaknesses. Yes, it's hard to imagine a super-language for everything. > > One strength of Lisp is how easy it is to use dynamic data > structures. But it has weaknesses in weak typing and slow execution. Well, that's true from the Ada programmer's perspective, however Lispers generally don't think weak typing is a weakness, but rather a strength (but device drivers, for instance, don't generally get written in Lisp, I think, so we get back to horses for courses). Slow execution is also somewhat relative. Ada is slower than C, for instance, unless you disable run-time checks (an Ada strength), and even then Ada may still have extra features/overhead that C doesn't have. Similarly, Lisp has features/overhead that Ada doesn't have, and time (or space) penalties to go with them. Lisp is good for an experimental/exploratory/evolutionary/incremental style of programming, with modern compilers producing very good execution speeds for most problem domains; whereas Ada is great for a software engineering approach, and has excellent strengths in areas like safety, portability, etc, which you all know. Anyway, my main purpose now is learning Ada, because it definitely has valuable strengths not found in other languages I've used, like Pascal (various), C, Perl, Python, and lately, Common Lisp. > > Setting up the Charles library seems to me about equal in lines of > code and what you have to know to setting up STLs in C++. I made light use of a container library for Delphi, and didn't have any great problems with it (besides getting my head around concepts like iterator). I'd say it was easier to use than Charles because there was no concern about instantiating generic packages, nor any requirement to create multiple source files. > The first few times is quite confusing and frustrating, but it gets > easier as you do it more often. Definitely so! I don't expect to have too much trouble in future, now that I've worked through the initial issues. > It is still easier than creating your own from scratch. Yes, indeed! David -- David Trudgett http://www.zeta.org.au/~wpower/ The recognition or non-recognition of a certain truth depends not on external causes, but on certain other causes within the man himself. So that at times under external conditions apparently very favorable for the recognition of truth, one man will not recognize it, and another, on the contrary, under the most unfavorable conditions will, without apparent cause, recognize it. -- Leo Tolstoy