Live data from Hacker News

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

iqiipi.com

31–40 of 242 posts

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

#31
post #11

From the main page of this website: "These are not positions. They are proposals — structures through which a subject might be examined rather than verdicts about it." The entire site is AI written.

How is that evidence that the site was AI written?

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

#32

I am wondering what the Ada equivalent of affine types is. What is the feature that solves the problem that affine types solve in Rust.

The SPARK subset of Ada^1 has a similar kind of move semantics for pointer types^2.

1: SPARK is a formally verifiable subset of Ada: https://en.wikipedia.org/wiki/SPARK_(programming_language)

2: https://arxiv.org/pdf/1805.05576

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

#33
post #28

> Every language that has added sum types in the past twenty years has added, with its own syntax, what Ada's designers put in the original standard. While true, that doesn't mean that other language's sum types originated in Ada. As [1] states, > NPL and Hope are notable for being the first languages with call-by-pattern evaluation and algebraic data types and a modern language like Haskell has origins in Hope (from…

The origin of all sum types is in "Definition of new data types in ALGOL x", published by John McCarthy in October 1964, who introduced the keyword UNION for such types (he proposed "union" for sum types, "cartesian" for product types, and also operator overloading for custom types).

John McCarthy, the creator of LISP, had also many major contributions to ALGOL 60 and to its successors (e.g. he introduced recursive functions in ALGOL 60, which was a major difference between ALGOL 60 and most existing languages at that time, requiring the use of a stack for the local variables, while most previous languages used only statically-allocated variables).

The "union" of McCarthy and of the languages derived from his proposal is not the "union" of the C language, which has used the McCarthy keyword, but with the behavior of FORTRAN "EQUIVALENCE".

The concept of "union" as proposed by McCarthy was first implemented in the language ALGOL 68, then, as you mention, some functional languages, like Hope and Miranda, have used it extensively, with different syntactic variations.

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

#34

Ada is a language that had a lot of useful features much earlier than any of the languages that are popular today, and some of those features are still missing from the languages easily available today. In the beginning Ada has been criticized mainly for 2 reasons, it was claimed that it is too complex and it was criticized for being too verbose. Today, the criticism about complexity seems naive, because many later l…

> Today, the criticism about complexity seems naive, because many later languages have become much more complex than Ada

I don’t think you really understand what you’re saying here. I have worked on an ada compiler for the best part of a decade. It’s one of the most complex languages there is, up there with C++ and C#, and probably rust

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

#35

It'd be a neat trick to have a single unified language which could bridge the gap between software and hardware description languages.

It's an intriguing idea. Having experience with software but almost none (only hobbyist) in hardware, I imagine it'd require a strong type system and mathematical foundation. Perhaps something like Agda, a language that is a proof assistant and theorem prover, with which one can write executable programs. https://en.wikipedia.org/wiki/Agda_(programming_language)

I wonder if an escape hatch like Rust's unsafe{} would be enough... a hardware{}. The real complexity likely lies in how to integrate the synthesis tools with the compiler and debugger. The timing model. A memory model like Rust's would certainly aid in assuring predictable behavior, but I'm not certain it would be sufficient.

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

#38
post #8

The next language ought to ensure memory-safe conditions across the network.

Already exists since way back: https://github.com/mozart/mozart2 (for example)

I only realized now CTM is more than 20 years old. In my mind it's still a cool new book.

CTM: https://en.wikipedia.org/wiki/Concepts,_Techniques,_and_Mode...

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

#40

Ada is a language that had a lot of useful features much earlier than any of the languages that are popular today, and some of those features are still missing from the languages easily available today. In the beginning Ada has been criticized mainly for 2 reasons, it was claimed that it is too complex and it was criticized for being too verbose. Today, the criticism about complexity seems naive, because many later l…

Verbosity is a feature not a bug. Programming is a human activity and thus should use human language and avoid encoded forms that require decoding to understand. The use of abbreviations should be avoided as it obsfucates the meaning and purpose of code from a reader.
Post reply on HN