News for hackers. Stuff that matters.
Re:Checked C: extension to C that adds static and dynamic ch... by inamberclad on Thursday March 15, 2018 @01:56AM (#16590701)
I 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.

Re:Checked C: extension to C that adds static and dynamic ch... by eesmith on Thursday March 15, 2018 @04:10AM (#16591134)
Is 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.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.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... ) 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++.

Re:Checked C: extension to C that adds static and dynamic ch... by kqr on Thursday March 15, 2018 @09:19AM (#16592529)
Sure, 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...

Re:Checked C: extension to C that adds static and dynamic ch... by eesmith on Thursday March 15, 2018 @02:03PM (#16595122)
You 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.

Re:Checked C: extension to C that adds static and dynamic ch... by beefhash on Thursday March 15, 2018 @01:57AM (#16590704)
Last 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?

Re:Checked C: extension to C that adds static and dynamic ch... by inamberclad on Thursday March 15, 2018 @02:15AM (#16590768)
There'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://blog.adacore.com/

https://two-wrongs.com/tags.html#ada

The official reference manual is freely available too, but it's quite dense.

Re:Checked C: extension to C that adds static and dynamic ch... by wiz21c on Thursday March 15, 2018 @03:57AM (#16591083)
Given 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.

Re:Checked C: extension to C that adds static and dynamic ch... by adrianN on Thursday March 15, 2018 @04:06AM (#16591116)
C and C++ have big communities and they're also not primarily targeted at weekend projects.
Re:Checked C: extension to C that adds static and dynamic ch... by simias on Thursday March 15, 2018 @06:55AM (#16591721)
They 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".

Re:Checked C: extension to C that adds static and dynamic ch... by kqr on Thursday March 15, 2018 @07:16AM (#16591808)
> 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.

Re:Checked C: extension to C that adds static and dynamic ch... by simias on Thursday March 15, 2018 @08:12AM (#16592107)
>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.