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-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!postnews.google.com!q11g2000yqi.googlegroups.com!not-for-mail From: Martin Newsgroups: comp.lang.eiffel,comp.lang.ada,comp.lang.modula3,comp.programming Subject: Re: Alternatives to C: ObjectPascal, Eiffel, Ada or Modula-3? Date: Wed, 22 Jul 2009 00:53:52 -0700 (PDT) Organization: http://groups.google.com Message-ID: <0bd49fc3-8fae-44ca-93fb-938fabffb892@q11g2000yqi.googlegroups.com> References: <51617b48-400b-4296-9362-78aa712bb6b2@a7g2000yqk.googlegroups.com> NNTP-Posting-Host: 20.133.0.8 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: posting.google.com 1248249232 4134 127.0.0.1 (22 Jul 2009 07:53:52 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Wed, 22 Jul 2009 07:53:52 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: q11g2000yqi.googlegroups.com; posting-host=20.133.0.8; posting-account=g4n69woAAACHKbpceNrvOhHWViIbdQ9G User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.9.0.12) Gecko/2009070611 Firefox/3.0.12,gzip(gfe),gzip(gfe) Xref: g2news2.google.com comp.lang.eiffel:386 comp.lang.ada:7261 comp.lang.modula3:83 comp.programming:11966 Date: 2009-07-22T00:53:52-07:00 List-Id: On Jul 21, 5:06 pm, Jon Harrop wrote: > Martin wrote: > > On Jul 21, 3:09 pm, Jon Harrop wrote: > > But I'm afraid it does...20 years ago it didn't. > > Not according to John Barnes' "Rationale for Ada 2005": > > http://www.adaic.org/standards/05rat/html/Rat-3-4.html The first part of this shows how they weren't...read on and it shows that have been added (anonymous access types) to provide downward closures (what I took from "first-class lexical closures"). > > Yes, that's right...and they are replacing them with GNU/Linux > > bozes...you didn't read far enough. > > If they are still running on embedded 68k CPUs then it cannot be very > computationally intensive work by today's standards. They seem to be just > gathering a not-huge amount of data which is neither interesting nor > relevant in this context. No - they are Intel/Linux boxes (GNAT GPL 2007 is Intel only), not PPC and they gather _and_ process the data (the FORTRAN bit they are replacing). I didn't realise there was a size threshold before something became "interesting" :-) I have no idea how much data they are collecting / processing but it's certainly relevant - your claim was you had "never heard of anyone using any of those languages for it" ('it' being scientific computing) and I've provided an example, so now you have. > > There's plenty that's modern about Ada - it did multi-core natively > > and portably long before the current flavour-of-the-month boys came to > > the party. > > Fortran did parallelism before Ada and the current "flavour-of-the-month > boys" like Cilk and .NET 4 provide modern solutions for parallelism built > upon wait-free work-stealing concurrent deques that Ada not only does not > have but cannot even express. Yes, their were other pre-Ada concurrent languages - just shows how modern Ada is! ;-) I don't use .NET but there's certainly Ada support for it (A# as it was called, now available from https://libre.adacore.com/libre/). If it's built into .NET then I don't see any reason why support couldn't be added. Does .NET offer different task scheduling policies? Or do you just 'get what's implemented'? There are 4 tasking policies already defined in Ada and implementations are free to add others: pragma Tasking_Dispatch_Policy (Wait_Free_Work_Stealing_Concurrent_Deques); ...doesn't exactly trip off the tongue but that's it expressed... Or if you're refering to the work by Chase & Lev @ Sun, then they implemented it in C++. As far as I know there is nothing you can implement in C++ that you can't in Ada (or many other languages) and visa-versa, so it could be added as an external library (akin to replacing the built in language 'task' keyword with library calls as you do when using an ARINC-653 supporting OS). > > The one thing that is missing is lambda support but that doesn't > > bother me to much given the sort of domains I work in. I think I heard > > it was being considered for the next language revision. > > What do you mean by "lambda support" if not first-class lexical closures? Ada only supports downward closures not full blown lambda expressions or functions - that really is the domain of the functional languages (or TMP). I can't write unnamed functions, e.g. classic C++ Boost example: for_each(a.begin(), a.end(), std::cout << _1 << ' '); ^^^^^^^^^^^^^^^^^^^^^^ unnamed function I'd have to wrap that in a function in Ada to a pass that (named) function. I can't return an unnamed function in Ada either. It's just downwards. But that's a whole lot more that the original Ada83 spec, which expected you to use generic (template) functions instead. Do- able but a lot more effort. I believe there is work on adding some sort of unnamed function support to a future language revision. > >> "the right choice for courses in elementary programming" > > > Nothing wrong with that - it's also very well suited to intermediate > > and advanced programming. > > In the embedded space, perhaps. Not just embedded - it's a general purpose language but it certainly isn't functional. Most of my Ada work isn't embedded at all these days...usually console apps. Cheers -- Martin