It's amazing how underestimated the Object Pascal language is. Certain people or rivals want to write it off or declare it's "dead", yet the language (including various dialects) are still going strong.
For me it's less the verbose syntax but more the weirdness and inconsistency of it. Like making a distinction between a procedure and a function, or returning data from a function by assigning it to a magical variable. It feels like a cobbled-together language rather than a properly designed one.
I wasn't able to find a definitive account of why they're separated in Ada, but I believe the idea is this: functions are for where code behaves in a roughly functionally pure way and yields a value that should not be discarded by the caller, whereas procs are for functionality with 'deep' side-effects.
The SPARK subset of Ada comes pretty close to enforcing purity of Ada functions, although it still permits them to read globals. [0]
It's not just an oversight. The core of the Ada language was designed deliberately. [1]
baranul · · focus · HN ↗
maomao5 · · focus · HN ↗
[dead]
Narishma · · focus · HN ↗
MaxBarraclough · · focus · HN ↗
The SPARK subset of Ada comes pretty close to enforcing purity of Ada functions, although it still permits them to read globals. [0]
It's not just an oversight. The core of the Ada language was designed deliberately. [1]
[0] <a href="https://learn.adacore.com/courses/intro-to-spark/chapters/01_Overview.html#no-side-effects-in-expressions" rel="nofollow">https://learn.adacore.com/courses/intro-to-spark/chapters/01...
[1] <a href="https://en.wikipedia.org/wiki/Ada_(programming_language)#History" rel="nofollow">https://en.wikipedia.org/wiki/Ada_(programming_language)#His...