4 ms·
If anyone is looking for a battle-tested (sometimes literally) production ready, statically and dynamically checked C-like language, take a look at https://ada2
by kqr 9y ago
If anyone is looking for a battle-tested (sometimes literally) production ready, statically and dynamically checked C-like language, take a look at https://ada2012.org https://ada2012.org!
- inamberclad 9y agoI really want Ada to get its fair share of attention. It's an impressively well thought out language. It's like a team of academics and industry pros took a long hard at C and C++ and then made something to fit the the same niche (high performance, real time, and very important software), but made it almost impossible to write incorrect code. Actually, that's exactly what happened.
- beefhash 9y agoLast I heard about Ada, there was the issue of having virtually no community that shares code freely, just commercial vendors selling theirs. Has that situation improved?
- inamberclad 9y agoThere's a free compiler called Gnat, but the community is still rather small. I think it's something of a catch-22. Most of the resources you'll find on the internet are old (mid-90s) blogs and educational sites. Here's some of the better ones I've found: https://www.adacore.com/gems/ https://www.adacore.com/gems/ https://blog.adacore.com/ https://blog.adacore.com/ https://two-wrongs.com/tags.html#ada https://two-wrongs.com/tags.html#ada The official reference manual is freely available too, but it's quite dense.
- wiz21c 9y agoGiven the parent comment : >>> fit the the same niche (high performance, real time, and very important software I don't see any community emerging from the web any time soon :-) To me this niche means "avionics, military, nuclear, medical, spatial". Not your week-end project.
- adrianN 9y agoC and C++ have big communities and they're also not primarily targeted at weekend projects.
- simias 9y agoThey used to be, using "scripting" languages as general purpose is relatively recent development. Up until the early 2000 few people would have considered writing anything remotely CPU-intensive in Perl or Javascript. For instance I first started coding in C in high school because I wanted to write games for my calculator and the BASIC interpreter was too slow. I don't think there was an Ada compiler targeting my calculator, but there sure was a gcc port. C's history is tightly coupled with that of Unix, it's always been rather open and "hacker-friendly".
- kqr 9y ago> C's history is tightly coupled with that of Unix, it's always been rather open and "hacker-friendly". I'm not sure I agree. Sure, it's reasonably easy to write your own implementation of something that closely resembles C, but C is also infamously dependent on implementation specifics and it, last I checked, had a paywalled standard. That's the opposite of open and hacker-friendly. The primary reason C feels open is, I suspect, precisely its Unix coupling. If you want to read the sources to your Unix-like OS, you're likely to find sources written in C. You'll also find system libraries with C calling conventions. If you crack open your OS, you find C. It's easy to see the connection between "open", "hacker-friendly" and "C" – but the connection is between your OS and your knowledge of C – not C itself.
- simias 9y ago>You'll also find system libraries with C calling conventions. If you crack open your OS, you find C. It's easy to see the connection between "open", "hacker-friendly" and "C" – but the connection is between your OS and your knowledge of C – not C itself. You're right (and it's a bummer that the C standard is behind a paywall) but don't you think that having a large open ecosystem is more important and significant than having an open technical standard, especially when several high quality open source compiler implementations already exist? Having an open standard won't do you much good if all the tooling and libraries are closed source.
- deleted 9y ago[deleted]
- eesmith 9y agoIs it? To start, it isn't really a C-like language, is it? It looks more like Pascal (or Modula), which is a different offshoot from ALGOL than C is. Wikipedia tells me that Ada-0 was based on LIS from the mid-1970s, so a couple of years before the K&R C book came out. The Ada '83 Rationale, at https://web.archive.org/web/19970407040255/http://sw-eng.falls-church.va.us:80/AdaIC/standards/83rat/html/ratl-02-02.html#2.2 https://web.archive.org/web/19970407040255/http://sw-eng.fal... , mostly compares Ada to Pascal equivalents, though many other languages are mentioned. The bibliography lists those languages: https://web.archive.org/web/19970407041806/http://sw-eng.falls-church.va.us:80/AdaIC/standards/83rat/html/ratl-BIB.html#languages https://web.archive.org/web/19970407041806/http://sw-eng.fal... . You'll note that C is not present in the list. The Ada 95 Rationale does reference C and C++ ("Ada 95 incorporates the benefits of Object Oriented languages without incurring the pervasive overheads of languages such as SmallTalk or the insecurity brought by the weak C foundation in the case of C++" - http://www.adahome.com/LRM/95/Rationale/rat95html/rat95-p1-2.html http://www.adahome.com/LRM/95/Rationale/rat95html/rat95-p1-2... ) but as you can see, it also refers to Smalltalk. The references include Modula (though not Modula-2) and Wirth's paper on "Type Extensions". It comes across like they drew much more from languages other than C and C++, and were in the niche of "high performance, real time, and very important software", but from a different path than C/C++.
- kqr 9y agoSure, it's obvious it wasn't based on C/C++, but these days, among the most popular languages, it plays in the same sandbox. I'm sure if you'd run an unsupervised clustering over the Wikipedia pages for various programming languages, you'd get Ada in the same cluster as C, C++, Rust, D, and maybe Go. ...actually, this is something I'd really like to do if I had more time...
- eesmith 9y agoYou say it's obvious, and I agree. But I want to know why kqr called it a "C-like language" and why inamberclad said it comes from "a team of academics and industry pros [who] took a long hard at C and C++ and then made something to fit the the same niche." Those seem to be ahistorical comments. It's no surprise that languages used in embedded and real-time systems would cluster together. But that doesn't reveal intent and influence.
- debatem1 9y agoFYI, I get a tls error on that link, in case you're affiliated with the webmaster.
- kqr 9y agoI'm not affiliated, so not much I can do there. But it did pique my interest: I get the warning on my desktop computer but not on my laptop nor my phone. All three are running a recent version of Firefox. No idea why that is. Edit: Silly me. I know why. I visited the HTTP version of the site on those two devices...
- Hasknewbie 9y agoAda is in practice almost completely maintained by one single (consulting) company, Adacore, who, except for the GNAT compiler, release all of their OSS contributions under GPLv3 "to limit your freedom [of use/reuse]" (it's mentioned explicitly on their Website). They do NOT want an autonomous Ada community to pop up, they just want to attract programmers they can contract. Since they're basically the only noteworthy contributors for Ada, they're impossible to bypass, hence using Ada means submitting to Adacore's whims. Ada is indeed a very well designed language, and with some recent language revisions, so have you ever wondered why it did not get any traction at all? Well, that's why. Every 6 months or so on HN or Reddit, someone rediscovers Ada, gets psyched and tells everyone ... and then discovers the licensing / controlled ecosystem issues, and walks away. And we don't hear about it. For about 6 months.
- pjmlp 9y agoAdacore is not the only compiler vendor in town. https://www.ghs.com/products/ada_optimizing_compilers.html https://www.ghs.com/products/ada_optimizing_compilers.html https://www.ptc.com/en/products/developer-tools/objectada https://www.ptc.com/en/products/developer-tools/objectada https://www.ptc.com/en/products/developer-tools/apexada https://www.ptc.com/en/products/developer-tools/apexada Ada it is pretty live in European universities, a constant presence at FOSDEM during the last decades, and high integrity computing conferences. Also, if you want the industry to care about any C or C++ feature, you have to buy your seat at the ANSI/ISO table.
- Hasknewbie 9y agoYou are correct, but I was speaking in terms of general-purpose programming, with an OSS/free implementation available, and to my knowledge all the other vendors only target the embedded and high-integrity spaces. And they cost money. Moreover Adacore is the only one to have a general-purpose OSS (albeit kind of captive) ecosystem. Your ANSI/ISO remark is off-topic. You don't need a seat there to use the extensive C++ ecosystem. With Adacore it's either GPLv3 all the way or you pay up. Also, to underline their gatekeeper status even more: they could one day decide to stop releasing their compiler to GNAT, without giving any reason, and there's nothing anyone could do about it.
- bpizzi 9y agoKind of nitpick, but actually the first look at https://ada2012.org https://ada2012.org is a CERT_INVALID error from the browser.