comp.lang.ada
 help / color / mirror / Atom feed
From: David Trudgett <wpower@zeta.org.au.nospamplease>
Subject: Re: Charles container library usage examples
Date: Sat, 10 Sep 2005 17:38:15 +1000
Date: 2005-09-10T17:38:15+10:00	[thread overview]
Message-ID: <m3zmqlgyoo.fsf@rr.trudgett> (raw)
In-Reply-To: 4321a2e0_3@newsfeed.slurp.net

James Alan Farrell <jfarrell@nospam.com> 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




  reply	other threads:[~2005-09-10  7:38 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-09-03  2:38 Charles container library usage examples David Trudgett
2005-09-03  5:15 ` Matthew Heaney
2005-09-03  9:45   ` Simon Wright
2005-09-04  6:25     ` David Trudgett
2005-09-05 11:28       ` Georg Bauhaus
2005-09-04  0:26   ` David Trudgett
2005-09-04  9:49     ` Matthew Heaney
2005-09-06  3:01       ` David Trudgett
2005-09-06 16:22         ` Jeffrey Carter
2005-09-07  0:15         ` Matthew Heaney
2005-09-04 17:19     ` Ludovic Brenta
2005-09-06  3:01       ` David Trudgett
2005-09-06  5:08         ` Ludovic Brenta
2005-09-06  6:46           ` David Trudgett
2005-09-06  7:26             ` Ludovic Brenta
2005-09-24  0:05               ` Randy Brukardt
2005-09-09 14:57         ` James Alan Farrell
2005-09-10  7:38           ` David Trudgett [this message]
2005-09-10 14:55             ` Matthew Heaney
2005-09-10 15:26               ` Ludovic Brenta
2005-09-10 17:58                 ` Matthew Heaney
2005-09-12  0:24               ` Robert A Duff
2005-09-11 10:52             ` Georg Bauhaus
2005-09-11 21:14               ` David Trudgett
2005-09-13 23:41                 ` Björn Persson
2005-09-14  6:39                   ` David Trudgett
2005-09-12  0:21             ` Robert A Duff
2005-09-12  0:57               ` David Trudgett
2005-09-12  1:01                 ` Robert A Duff
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox