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=unavailable autolearn_force=no version=3.4.4 Path: buffer2.nntp.dca1.giganews.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!news.glorb.com!eternal-september.org!feeder.eternal-september.org!mx02.eternal-september.org!.POSTED!not-for-mail From: Paul Rubin Newsgroups: comp.lang.ada Subject: Re: If not Ada, what else... Date: Fri, 10 Jul 2015 11:22:56 -0700 Organization: A noiseless patient Spider Message-ID: <87mvz36fen.fsf@jester.gateway.sonic.net> References: <14592326-5070-4663-a864-5684298f3748@googlegroups.com> <004361da-53c4-4ea9-8cc6-38944aa6c7ad@googlegroups.com> <29dd5458-f9ce-4db8-9128-8ab35a9ce5f8@googlegroups.com> <64bc671c-72e5-4924-b703-3b907c69949c@googlegroups.com> <877fq9uj6g.fsf@theworld.com> <65061686-5c8f-433b-9b11-9e228298158e@googlegroups.com> <87k2u96jms.fsf@jester.gateway.sonic.net> <06f8a6f9-d219-4d40-b9ac-8518e93839bd@googlegroups.com> <87y4io63jy.fsf@jester.gateway.sonic.net> <7a29d3e9-d1bd-4f4a-b1a6-14d3e1a83a4d@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: mx02.eternal-september.org; posting-host="22184b02e80198190244f5a2dd813f11"; logging-data="9692"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+7x72nhSOfdgFcaMnmmb3m" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) Cancel-Lock: sha1:kcOD+1Dclr2sBXCEivy99VMnI6Y= sha1:mS/BwXMu9IiC668b92O4/WdO/h0= Xref: number.nntp.giganews.com comp.lang.ada:194056 Date: 2015-07-10T11:22:56-07:00 List-Id: David Botton writes: >> Well, the big win of Ada 2012 is SPARK integration, it seems to me. > Adding Pre/Post, etc. is more like Eiffel integration. Not that big a > deal to be officially part of the language itself, but not unwelcome. The old SPARK overloaded Ada's comment syntax, which has always felt crufty to me. Similar things happen in other languages and I've never been enamored of it. E.g. Doxygen, Haddock, etc. It's ok if an experimental tool like Liquid Haskell works by munching code comments, but I'd want it to become part of the official language when it grows up. > If you manage your types well in Ada you need far less of these > "extras". More emphasis on Ada's real strength in typing is a smarter > investment in the language and leaving proving tools outside the > language. I certainly hope things don't go further than they already > have in this direction. I remember being disappointed that (unless I missed something) there doesn't seem to be a way to put assertions in the middle of a function body and have Spark check them statically. Am I mistaken about that? I hope they add it. > From a marketing perspective AdaCore made a mistake reversing the > original direction of SPARK to distance itself as far from Ada as > possible. The Ada name is burnt in the US and it was good marketing to > create distance. They should have just changed their name to CodeCore > and marketed their multiple language products all focused on "correct > code". I think Ada is somewhat rehabilitated now, partly because of Ada 2012. I was aware of SPARK before that, when it was a separate expensive tool from a specialty vendor. Without it, Ada was just a clumsy and bureaucratic Pascal-like language. I got much more interested in using it when it became part of the GNAT collection. >> There's nothing like that for D. > Actually there is and has been there for some time. Pre/Post, > invariants, etc. and with a syntax that is far cleaner. Are there tools like SPARK for statically verifying the D annotations? > The feature of Ada (and is a big one) that places Ada ahead of D (and > other languages) is the type system of Ada that has been in place > since Ada 83. I may be missing something here, but I don't see where Ada's type system is that much better than C++'s, and it's way behind Haskell's. Ranged types are useful but you can implement them (with runtime checks) in other languages. They're interesting in Ada 2012 mostly because of the possibility of checking them statically with Spark. Another big advantage of Ada is much more precisely defined semantics than C++'s. To quote another poster, the Ada community has put colossal effort into certifying compilers and solidifying the standard. I don't know how D fares in this comparison. > The funny thing is that I don't consider that a big deal at all. I > enjoy Ada in particular because of the ways I get around needing to > have a GC because of it There are generally ways to program without a GC, but if your application constraints allow you to use one, it can make your code simpler and more maintainable, as well as speeding development. Are you programming to solve puzzles or are you trying to get a task accomplished? If you like puzzles, try Forth ;-). > BTW, Ada has always considered a D like implementation of a GC, just > that only 3 implementations of Ada, that I know of, ever did it. Does > that put Ada in a different category now too? Ada with a GC would be interesting and in a different category but it would lose its suitability for constrained, realtime environments. At that point it's competing with Java (and Java's offspring like Scala). > In fact D and Ada are _exactly_ in the same space, designed to be > systems languages and general purpose. (Actually there are a number of > device drivers written in D at least 2 OSes, etc.) Ada unlike SPARK is > not a niche language, just being forced in to one. I guess in my world, any non-GC'd language is niche (it's used for either small embedded environments, high-assurance realtime, or maximizing performance like for numerics or big network servers). For the general purpose middle ground, current trends are toward GC'd languages that support functional-programming idioms, which Ada isn't so hot at. > I am not advocating D, nor asking the D people to consider improving > their type system, I'm advocating community efforts to improve Ada's > general purpose use and avoid it further sinking in to extreme niche > use that will make Ada in to SPARK or another niche language of little > use outside that niche. I think Ada is an attractive choice for lots of things that people (including me) are currently doing with C and C++, but I consider those to be niche languages today too (unlike 20 years ago).