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,21960280f1d61e84 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Newsgroups: comp.lang.ada Subject: Re: How come Ada isn't more popular? References: <1169531612.200010.153120@38g2000cwa.googlegroups.com> <1mahvxskejxe1$.tx7bjdqyo2oj$.dlg@40tude.net> <2tfy9vgph3.fsf@hod.lan.m-e-leypold.de> <1170087805.6329.41.camel@localhost> From: Markus E Leypold Organization: N/A Date: Mon, 29 Jan 2007 17:56:42 +0100 Message-ID: <2n4pq97ovp.fsf@hod.lan.m-e-leypold.de> User-Agent: Some cool user agent (SCUG) Cancel-Lock: sha1:tVGG3bEtf76PlqfnxG8y2JoU4AQ= MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii NNTP-Posting-Host: 88.72.222.69 X-Trace: news.arcor-ip.de 1170089514 88.72.222.69 (29 Jan 2007 17:51:54 +0200) X-Complaints-To: abuse@arcor-ip.de Path: g2news2.google.com!news2.google.com!news1.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!t-online.de!newsfeed.freenet.de!news.unit0.net!newsfeed.arcor-ip.de!news.arcor-ip.de!not-for-mail Xref: g2news2.google.com comp.lang.ada:8715 Date: 2007-01-29T17:56:42+01:00 List-Id: Georg Bauhaus writes: > On Sun, 2007-01-28 at 16:06 +0100, Markus E Leypold wrote: >> "Dmitry A. Kazakov" writes: >> >> Since a lot of programming these days is general list >> manipulation, everyday jobs become painful. In this case it was really me that wrote this, not Dmitry. People, what's with news readers? :-)) > That lots of programming these days is list manipulation is a > popular misunderstanding I think. I disagree. It's not all there is, but certainly there is lot of lists everywhere. People enter lists of item into systems, the retrieve lists of items. Lists of items are shown in GUI windows. Many loops are actually processing lists of thingies (even if the list never turns up explicitly -- it perhaps would in a functional language. > Witness the popularity of what is known as Okasaki's Book. That notwithstanding. > "forall", "exists", remove-member, map(filter'access, items), > etc. do not require lists. Some of these operations don't even need > traversal (iteration, recursion, whatever you call it). > On the contrary, old Lisp style sets and maps have > always known to be as inefficient as O(n) can be. I agree here to a certain extend. A list is not always the best representation, which is the reason that "hashes" or "dictionaries" (actually: maps) are so prevalent in most modern scripting languages. But with lists (for sequential processing) and maps (and some sets) we're almost done for everyday data processing and are vastly more powerful than C, ..., Ada. Therefore my plea that a modern all purpose language should have lists in the standard library (or in the language syntax), and of course I should have added maps and sets. I would like add, that I've been participating in teaching software engineering for some time. There was one exercise to specify something which should have been easy to do using sets. Unfortunately a number of participants ended up trying to emulate list processing (in VDM-SL) and writing loops instead of just writing x \in M. And this where students almost the end of their studies. I still wonder what I can learn from that ... -- perhaps that they unlearned during their occupation with C++ and Java (their main background) to think in the proper abstractions (none of those languages has a set primitive, just clumsy containers). > > As you have said yourself, > > "the presence of >> lists and hashtables/dictionaries in those languages together with the >> absence of memory management is a factor in this popularity. > > It's not lists you manipulate when using hashtables/dictionaries. Ah, yes. I was a bit short with my original statement, as you have noted. But since came somewhere from "what should a language have to be useful /successful" my statement still stands: Should have lists, but of course ALSO sets and maps. > >> But what is absolutely annoying, is, that the compatibility of >> objects is determined by inheritance instead by the type >> signature. > > Compatibility of objects or of references to objects? What about > assignment? Subtype polymorphic compatibility. And there are only references to objects in OCaml (if you're asking about this). In Ada there are certainly various compatibilities - Assignment of objects not possible if not the same type -- no compatibility there. - Passing a A for a B is only possible if A is derived from B (wether by reference or not). - The same goes for casting I'm actually missing what it buy you to differentiate "Compatibility of objects or of references to objects?". Where there is compatibility (subtype polymorphism) at all, it's tied to inheritance (of implementation!). Perhaps I'm missing your point. > I think interface types are helpful here. A clumsy workaround, which also doesn't fix the co/contravariance problem with binary methods. :-). > >> The Java generics >> tutorial in I my eyes documents 2 things: (a) what has been really >> sorely missing from Java for 10 years and (b) that you can complement >> a type safe pascalish type system usefully with subtyping and >> parameterized types. > Why isn't Eiffel popular? :-) I don't know. I know, why it didn't pass my evaluation: No bindings to GUI toolkits (which is another matter), the same problem with the type system as far as I can see. Regards -- Markus