Live data from Hacker News

Ada, its design, and the language that built the languages

iqiipi.com

161–170 of 242 posts

Re: Ada, its design, and the language that built the languages

#161
post #159

Ada was also ignored because the typical compiler cost tens of thousands of dollars. No open source or free compiler existed during the decades where popular languages could be had for free. I think that is the biggest factor of all.

The article gives another reason "A second answer is aesthetic. Ada's syntax is verbose in a way that programmers with a background in C find unpleasant. if X then Y; end if; instead of if (x) { y; }. procedure Sort (A : in out Array_Type) instead of void sort(int* a)." I think this should not be underestimated. There is a huge number of small C compilers. People write their own C compiler because they want to have o…

The real problem is that Ada forces you to plan ahead and most developers don't really know how to do that.

Re: Ada, its design, and the language that built the languages

#162
post #152

Earlier quoted context omitted.

I think Oracle PlSQL was also based on Ada, basically Ada + SQL embedded. So it may be the widest used version of "Ada".

Wow, that’s a factoid I’d love to learn more about!

https://www.petefinnigan.com/weblog/archives/archive-042020....

Re: Ada, its design, and the language that built the languages

#163
post #159

Earlier quoted context omitted.

The article gives another reason "A second answer is aesthetic. Ada's syntax is verbose in a way that programmers with a background in C find unpleasant. if X then Y; end if; instead of if (x) { y; }. procedure Sort (A : in out Array_Type) instead of void sort(int* a)." I think this should not be underestimated. There is a huge number of small C compilers. People write their own C compiler because they want to have o…

The real problem is that Ada forces you to plan ahead and most developers don't really know how to do that.

I'd say that is even more so with Rust and Rust got popular in a very short amount of time.

Re: Ada, its design, and the language that built the languages

#164

Earlier quoted context omitted.

Not really. That was written by someone who doesn't really know the language and is writing from a position of hearsay. Ada is "verbose" in that it has fairly rigorous type specification. It was verbose in comparison to languages that had weak or primitive typing. A lot of the "bureaucracy" in the language is being very specific about types to catch bugs. Ada 83 did have a problem in that it lacked [interfaces]. This…

https://ada-lang.io/docs/learn/lang/being-more-terse

Is this supposed to be some sort of own? That article is about language features Ada has to reduce verbosity, including operator overloading and some brevity features.

A explicit strong, statically typed language is going to have a lot of text in the file about types. When Ada came out this was a jarring concept for a lot of people (especially C programmers) which lead to the "Ada is a bureaucratic language" complaint. In fact, Ada has stuff like operator overloading where C, for instance, does not. But it absolutely has types and they absolutely are not optional and are explicit.

Re: Ada, its design, and the language that built the languages

#165

Earlier quoted context omitted.

does it really matter? If AI can produce an essay of such quality - take my respect and steal my time please

I think so. Who writes something and why are important context for what we do with the information. It's an issue with the lack of disclosure, not AI in general. Most longform readers will assume an author has deep expertise and spent a lot of time organizing their thoughts, which lends their ideas some legitimacy and trust. For a small blog, an 8,000 word essay is a passion project. But if AI is detected in the phra…

> But if AI is detected in the phrasing and not disclosed, it begs a lot of questions.

absolutely zero questions from me. If I see two exactly same writings: one - by human, another - by AI. For me its doesn't matter.

> Most longform readers will assume an author has deep expertise and spent a lot of time organizing their thoughts, which lends their ideas some legitimacy and trust.

It's the incorrect assumption of "most readers". Before AI there are enough methods to throw a long read. So, AI isn't really a gamechanger here

Re: Ada, its design, and the language that built the languages

#166
post #150

Earlier quoted context omitted.

To expect is different from it being impossible.

Can't argue with that. But in defence of JavaScript -- since it enjoys routine bashing, not always undeserved -- it now has true runtime-enforced private members (the syntax is prefixing the name with `#`, strictly as part of an ES6 class declaration), but yeah -- this doesn't invalidate the statement "kind of got there 32 years after Ada, stumbling over itself".

JavaScript has supported real data hiding since the beginning using closures. You define your object in a function. The function's local variables act as the private members of the object. They are accessible to all the methods but completely inaccessible to consumers of the object.

Re: Ada, its design, and the language that built the languages

#167
post #147

Earlier quoted context omitted.

The claim that it was designed for Ada was just marketing hype, like the attempt of today of selling processors "designed for AI". The concept of iAPX 432 had been finalized before Ada won the Department of Defense competition. iAPX 432 was designed based on the idea that such an architecture would be more suitable for high level languages, without having at that time Ada or any other specific language in mind. The i…

The 286 worked perfectly fine. If you take a 16-bit unix and you run it on a 286 with enough memory then it runs fine. Where it went wrong is in two areas: 1) as far as I know the 286 does not correct restart all instruction if they reference a segment that is not present. So swapping doesn't really work as well as people would like. The big problem however was that in the PC market, 808[68] applications had access t…

The 286 worked perfectly fine as an improved 8086, for running MS-DOS, an OS designed for 8088/8086, not for 286.

Nobody has ever used the 286 "protected mode" in the way intended by its designers.

The managers of "extended memory", like HIMEM.SYS, used briefly the "protected mode", but only to be able to access memory above 1 MB.

There were operating systems intended for 286, like XENIX and OS/2 1.x, but even those used only a small subset of the features of the 286 "protected mode". Moreover, only a negligible fraction of the 286 computers have been used with OS/2 1.x or XENIX, in comparison with those using MS-DOS/DR-DOS.

Re: Ada, its design, and the language that built the languages

#168

I find multiple "strange" flaws with the article, even for my appreciation of Ada _and_ the article as an essay: * The article claims only Ada has true separation of implementation vs specification (the interface), but as far as I am able to reason, also e.g. JavaScript is perfectly able to define "private" elements (not exported by an ES6 module) while being usable in the module that declares them -- if this isn't "…

The reflection part is true. Private members are accessible to reflection in Java. You can call setAccessible(true) and then modify the contents of a String, for example.

Re: Ada, its design, and the language that built the languages

#169
post #131

Earlier quoted context omitted.

The claim that it was designed for Ada was just marketing hype, like the attempt of today of selling processors "designed for AI". The concept of iAPX 432 had been finalized before Ada won the Department of Defense competition. iAPX 432 was designed based on the idea that such an architecture would be more suitable for high level languages, without having at that time Ada or any other specific language in mind. The i…

The other CPU that was designed for Ada succeeded spectaculary: https://datamuseum.dk/wiki/Rational/R1000s400

I do not know much about the architecture of Rational/R1000s400, but despite that I am pretty certain the claims that it was particularly good for implementing Ada on it were not true.

Ada can be implemented on any processor with no particular difficulties. There are perceived difficulties, but those are not difficulties specific to Ada.

Ada is a language that demands correct behavior from the processor, e.g. the detection of various error conditions. The same demands should be made for any program written in any language, but the users of other computing environments have been brainwashed by vendors that they must not demand correct behavior from their computers, so that the vendors could increase their profits by not adding the circuits needed to enforce correctness.

Thus Ada may be slower than it should be on processors that do not provide appropriate means for error detection, like RISC-V.

However that does not have anything to do with the language. The same problems will affect C, if you demand that the so-called undefined behavior must be implemented as generating exceptions for signaling when errors happen. If you implement Ada in YOLO mode, like C is normally implemented, Ada will be as fast as C on any processor. If you compile C enabling the sanitizer options, it will have the same speed as normal Ada, on the same CPU.

In the case of Rational/R1000s400, besides the fact that in must have had features that would be equally useful for implementing any programming language, it is said that it also had an Ada-specific instruction, for implementing task rendez-vous.

This must have been indeed helpful for Ada implementers, but it really is not a big deal.

The text says: "the notoriously difficult to implement Ada Rendez-Vous mechanism executes in a single instruction", I do not agree with "notoriously difficult".

It is true that on a CPU without appropriate atomic instructions and memory barriers, any kind of inter-thread communication becomes exceedingly difficult to implement. But with the right instructions, implementing the Ada rendez-vous mechanism is simple. Already an Intel 8088 would not have any difficulties in implementing this, while with 80486 and later CPUs maximum efficiency can be reached in such implementations.

While in Ada the so-called rendez-vous is the primitive used for inter-thread communication, it is a rather high-level mechanism, so it can be implemented with a lower-level primitive, which is the sending of a one-way message from one thread to another. One rendez-vous between two threads is equivalent with two one-way messages sent from one thread to another (i.e. from the 1st to the 2nd, then in the reverse direction). So implementing correctly the simpler mechanism of sending a one-way inter-thread message allows the trivial implementation of rendez-vous.

The rendez-vous mechanism has been put in the language specification, despite the fact that its place would have better been in a standard library, because this was mandated by the STEELMAN requirements published in 1978-06, one year before the closing of the DoD language contest.

So this feature was one of the last added to the language, because the Department of Defense requested it only in the last revision of the requirements.

An equivalent mechanism was described by Hoare in the famous CSP paper. However CSP was published a couple of months after the STEELMAN requirements.

I wonder whether the STEELMAN authors have arrived at this concept independently, or they have read a preprint of the Hoare paper.

It is also possible that both STEELMAN and Hoare have been independently inspired by the Interprocess Calls of Multics (1967), which were equivalent with the rendez-vous of Ada. However the very close coincidence in time of the CSP publication with the STEELMAN revision of the requirements makes plausible that a preprint of the Hoare paper could have prompted this revision.

Re: Ada, its design, and the language that built the languages

#170

Earlier quoted context omitted.

Ada’s failure to escape its niche is overdetermined. Given the sophistication of the language and the compiler technology of the day, there was no way Ada was going to run well on 1980’s microcomputers. Intel built the i432 “mainframe on a chip” with a bunch of Ada concepts baked into the hardware for performance, and it was still as slow as a dog. And as we now know, microcomputers later ate the world, carrying alon…

The first validated compiler for Ada that ran on the IBM PC was released in 1983. The third validated compiler ran on the Western Digital “Pascal MicroEngine” running the UCSD p-system with 64K memory. The MicroEngine executed the byte code from the p-system natively, which was an interesting approach. I think more research is warranted by you on this subject.

Janus Ada 1.5 ran on CP/M.
Post reply on HN