Live data from Hacker News

Giving Ada a Chance

ajxs.me

51–60 of 261 posts

Re: Giving Ada a Chance

#51

Earlier quoted context omitted.

> [...] tiring with the all caps. I guess there is more to like then, since the keywords are case insensitive. The OP doesn’t even use all caps.

Odd, that was what I was told by our Ada teacher, and the book has all caps.

It is indeed a common misconceptions, but here is the official Ada 83 Language Reference Manual on the subject: http://archive.adaic.com/standards/83lrm/html/lrm-02-09.html...

> Reserved words differing only in the use of corresponding upper and lower case letters are considered as the same (see 2.3).

Interestingly, the manual itself doesn't even use upper case:

> For readability of this manual, the reserved words appear in lower case boldface.

So even the Ada standard recognizes the upper case is less readable and undesired.

Case insensitivity also applies to identifiers (variable names, type names etc.) (sec 2.3) and that is a definitely an archaic feature, but the GNAT compiler has the helpful -gnatya style check which enforces the Pascal_Case style: https://gcc.gnu.org/onlinedocs/gcc-4.6.4/gnat_ugn_unw/Style-...

---

Another common misconception is that function/procedure names (designators) must appear after the `end`. That is optional:

> If a designator appears at the end of a subprogram body, it must repeat the designator of the subprogram specification. http://archive.adaic.com/standards/83lrm/html/lrm-06-03.html...

Re: Giving Ada a Chance

#52
I went to a summer program at the US Air Force Academy and took a short class using Ada with Lego mindstorm robots. Having never done any programming at the time beyond BASIC (thanks to QBASIC and my TI-83+ calculator), I really enjoyed learning Ada. The instructor talked about the safety aspect of Ada which went over my head at the time :)

I have done a lot of embedded programming in C over the years and while the reality is most embedded programmers know C best, I am starting to think we would be better served to try a new language with better features such as Ada or Rust. C++ is nice as well, but has it's own set of problems when used for embedded programming.

Re: Giving Ada a Chance

#53

I like the "clean feel" of Ada's syntax: it combines the elegance of Python with a bit more structure and does not suffer from Python's significant whitespace issues. The so-called "Ada comb" structure that is used for packages, subprograms, and even declare blocks makes it easy to find what you are looking for because it makes the source code more regular. The "Ada comb" is formed by the shape of the source code wit…

I use PL/SQL a fair bit, which was inspired by Ada. Unfortunately, the designers did not bring over

ShortName is New ReallyLongAndAwkardName;

Ah, well.

Re: Giving Ada a Chance

#54

Earlier quoted context omitted.

I very briefly encountered MUMPS in grad school and its eldritch horror has remained seared in my brain.

In true Cthulhu fashion, after encountering it at a medical facility where the lead programmer bragged about how amazing it was, I bought a book on the language. I like collecting language books (Icon was fun), but that was rather painful to read through and I have done IBM JCL and found it not unpleasant.

The NY Times a few summers ago wrote up some firm in Wisconsin that handles data-processing for quite a few insurance companies, using MUMPS. A co-worker's son a summer or so before had weighed competing internships from that firm and from a financial company in New York. I said I thought that the latter would offer more portable experience.

Re: Giving Ada a Chance

#55
post #3

This was a good read. I instantly recognized the title of the textbook that is mentioned in the blogpost? I own it! Having a background in C, I went back and forth with Ada for years, without really jumping all in. In the last couple years in particular, with the growing popularity of Rust, I started to renew my interest. I'm reminded of a popular reddit thread on r/Ada-- someone called Rust a "toy language", which p…

> I just wonder why Ada didn't get the credit it deserved as being absolutely bulletproof

It's not. All languages make trade-offs in the performance-convenience-safety-etc space, and Ada's choice is not "100% safety". It lacks memory safety and has holes in its type system: https://www.enyo.de/fw/notes/ada-type-safety.html

Re: Giving Ada a Chance

#57

Earlier quoted context omitted.

> [...] tiring with the all caps. I guess there is more to like then, since the keywords are case insensitive. The OP doesn’t even use all caps.

Odd, that was what I was told by our Ada teacher, and the book has all caps.

Some people prefer all caps for keywords, just like they do nowadays on SQL code. But the language is case insensitive, you can choose otherwise.

Re: Giving Ada a Chance

#59

I went to a summer program at the US Air Force Academy and took a short class using Ada with Lego mindstorm robots. Having never done any programming at the time beyond BASIC (thanks to QBASIC and my TI-83+ calculator), I really enjoyed learning Ada. The instructor talked about the safety aspect of Ada which went over my head at the time :) I have done a lot of embedded programming in C over the years and while the r…

Nim has some influence from Ada in its type system and has much of the same feeling that the language is a power tool at your disposal. They have been making changes to make it useful without GC for embedded targets.

Re: Giving Ada a Chance

#60

> The writing is on the wall: Ada is here to stay. OK, this has no relation to the actual content of the article, but I have to point out that that is not what the phrase "the writing is on the wall" means.

In the original biblical usage a Babylonian king held a feast and suddenly a disembodied hand wrote: MENE, MENE, TECKEL, PARSIN on the wall, which translated to:

"Mene: God has numbered the days of your reign and brought it to an end."

"Tekel: You have been weighed on the scales and found wanting."

"Peres: Your kingdom is divided and given to the Medes and Persians.”

So you're right, it doesn't connote that something will endure, but that something will end.

Post reply on HN