[ prog / sol / mona ]

prog


Want to pick a schumeboard's mind...

6 2024-05-17 15:46

>>1
Ada is essentially a somewhat more powerful and less error-prone version of Pascal, originally developed during the time period when Pascal was seen as the standard programming language and C had not yet conquered the world. Many of its improvements in that sense are just syntactic modifications, like switching from block comments to line comments and making compound statement bodies the default for control flow constructs (to prevent mistakes like Apple's "goto fail"). Then they added generics, some other stuff we take for granted today, and in some cases, features that haven't appeared in any other major language since Ada.

The base language is not opinionated about mutable or aliasable state the way some newer languages are. Mostly it just makes it cumbersome to work with references and allocations (compared to Pascal and C) and marks deallocation as an "unsafe" operation. SPARK is far more strict. It called for the addition of contract-based programming features to Ada, and uses theorem proving to programmatically verify your claims about how your code will behave. All of that is encoded in an extremely verbose notation on top of an already verbose base language. C programmers like to dismiss Rust for being verbose, and for "duplicating" the efforts of the Ada/SPARK designers, but those criticisms are both nonsense, and together they are transparently disingenuous. Rust simplifies and automates so many tasks that SPARK makes complex and manual. That's not an indictment of SPARK, though; that's just what theorem provers were like in those days.

Modern SPARK is trying to follow Rust's example and make its own memory safety capabilities more ergonomic, and the Rust developers have spent years trying to help them. I don't know how far along they are, but that's the closest connection between these languages.

As for using Ada to write forum software, I think that's absurd; far too much work. Go for it.

10


VIP:

do not edit these