4 ms·
The examples remind me again why I turned away from C++ some years ago. In the first years of C++ it was real joy to write software in it but now the syntax se
by progman 12y ago
The examples remind me again why I turned away from C++ some years ago.
In the first years of C++ it was real joy to write software in it but now the syntax seems to be much more useful for obfuscation rather than maintainability.
Funny: When C++ began Ada 95 looked like a giant animal. Now Ada 2012 looks small and efficient in comparison although it is more powerful than Ada 95.
- pjmlp 12y agoUnfortunately Ada got relegated for niche areas where safety is of highest importance. System programming languages need OS vendors support to thrive.
- progman 12y agoAda is a general purpose programming language, including systems programming. http://www.ada2012.org http://www.ada2012.org Support is provided by AdaCore for instance: http://www.adacore.com http://www.adacore.com
- pjmlp 12y agoI do know a little bit about Ada, thanks. The point being systems programming languages die if not sponsored by the OS vendors, because they have to fight for mindshare among the so called business languages. In Ada's case, the high cost of development systems, rise of UNIX use in the enterprise, decline of Pascal based languages. All contributed to it being used in its field of origin (avionics) and systems where security and human life are of utmost importance. In Europe there was a rise of Ada projects due to lack of security in the usual C and C++, but these are always specialized projects, like train systems control and such. Not the typical Show HN applications. I would like to see Ada being more used in the industry, but sadly it won't happen.
- progman 12y ago> In Ada's case, the high cost of development systems Not necessarily. http://www.adacore.com/press/gnat-gpl-for-bare-board-arm/ http://www.adacore.com/press/gnat-gpl-for-bare-board-arm/ Look also for the book "Building Parallel, Embedded, and Real-Time Applications with Ada" by McCormick, Singhoff and Hugues. Some prominent embedded engineers wonder why Ada is not used much more: http://www.embedded.com/electronics-blogs/break-points/4008214/Why-aren-t-developers-interested-in-Ada- http://www.embedded.com/electronics-blogs/break-points/40082... > Rise of UNIX use in the enterprise Ada is available for Windows, Linux, OSX and ARM. GNAT/GCC is part of many Linux distros (usually Ada95). You can also download Ada2012 and Ada2014 compilers and tools from Adacore's website. > Decline of Pascal based languages. Ada looks a bit like Pascal but the language is far superior. In my opinion Ada's syntax makes software easier to maintain than C/Java like syntax. Even after years I have no problem to read into Ada code. C++ code can be difficult to read just after a short time. I think the real reason of Ada's decline is that it requires a lot of discipline of the developer. The same kind of discipline is required in Haskell. You cannot just sit down and code. You have to think a lot about your design before you hit the first key. Most developers don't like this, they want quick (and dirty) solutions, and they get it with C and C++.
- pjmlp 12y agoYou are missing the 80's picture. Back when we had to buy compilers for anything we wanted to do. Ada compilers and hardware requirements were too complex to target home computers, which we were mostly coding in Assembly for performance and space reasons. On the computer systems able to use Ada compilers, they were either running UNIX or some other mainframe OS. Maybe you don't know that Rational Software first product was a Ada Machine in the same vein as Lisp Machines, but with Ada. https://www.ibm.com/developerworks/community/blogs/gradybooch/entry/rational_anniversary?lang=en https://www.ibm.com/developerworks/community/blogs/gradybooc... On the UNIX systems when you bought the SDK, there was only C compiler there, latter C++ as well. Getting Ada meant shelling out for an extra compiler, now get business to pay for it. Mainframes like VMS were a bit more friendly to Ada, but if I remember correctly, still you need to pay for each language separately. So it doesn't matter where Ada is available today, but how its use since the early 80's progressed. Now it has to fight against established languages. Its use has been increasing in Europe (check FOSDEM Ada talks) mainly thanks to C and C++ security exploits and GNAT Core OSS efforts, but it is a slow progress.
- cbd1984 12y agoHow is Ada safer than Haskell? Everyone talks up Ada's safety, but they always seem to compare it to other Foogols, like C, C++, and Java/C#.
- pjmlp 12y agoIt is a different type of safety. Algol type safety, that C designers didn't care when creating the language rather leaving it out to lint. You cannot directly compare Ada with Haskell just on safety as they use different paradigms. Anyway, just from the top of my head: - Bound checked arrays - Real strings - Reference parameters - Real enumerations without implicit conversions to numeric data types - Type definitions are real types, not synonyms like C's typedef. Just like Haskell's newtype. - Ability to define type ranges for enumerations and numeric types - Subtyping - Generics - Explicit type conversions required among numeric types. - Contracts, Eiffel style - Pointers by default are always valid, unless your are doing unsafe code. In terms of performance, there are ways to enable unsafe code, if you really really need it, but like other memory safe systems programming languages you need to be explicit about it. A plus feature over Haskell is that currently the Ada has primitives for hardware access. The guys doing HaLVM and Home had to add extensions to Haskell.