No, we have several ISO standards already for curly-braced languages, plus e.g. for Ada, APL, Fortran, and Cobol, so many very different ones.
A.
Even function
is problematic for that, in e.g. Julia, not in as much in pure functional languages, because it’s also used for non-mathematical functions, i.e. those with side effects (marked by convention with !
in Julia, so not always).
I at least understand that in math a function is very general, but still has to be deterministic (so less so the in programming languages, there actually often rather procedure
s), for a given input, and e.g. rand()
isn’t (that you could argue should be named rand!()
). If you allow for the hidden/implicit global state (the seed), then it can be argued to be a function, but but it can no longer argued to be a “function” when asking for e.g. a non-pseudo random number.
Also function
and most keywords in languages are English-language biased. Also syntax is biased against non-syntax languages like Lisp/Clojure. Also (standard infix syntax) against concatenative languages, like Forth, or Smalltalk.
B.
I think it’s more productive to find the best semantics of a language, hopefully the one best, such as Julia, and then you need only that one defacto standard.
E.g. the (exact) syntax for destructors and RAII, is less important than what kind of RAII we have or if we have such semantics at all:
There are e.g. 11+ ways to do memory management, and we could standardize on the best one or few, and most are maybe only familiar with the main 3-4 ways, and not even the best one none of the common ways or borrow checking (TL;DR seemingly the best on is “generational references with regions”):
https://verdagon.dev/blog/higher-raii-uses-linear-types
Why haven’t we seen this before?
(Or skip to the Seven Arcane Uses)
Existing languages can’t quite do this, and I’ll show why below.
[…]
Rust is unfortunately even less capable than C++ here.
One of the intriguing approaches:
https://verdagon.dev/blog/when-to-use-memory-safe-part-1
Memory tagging will generate a random 4-bit number for every chunk of memory. Whenever we create a pointer to that memory, it will put that 4-bit number into the top unused bits of the pointer. […]
This is particularly good for debugging and testing. If this is enabled for your integration tests, then any invalid access bug has a 94% chance of being caught.
https://verdagon.dev/blog/when-to-use-memory-safe-part-2
Garbage collection is probably the best approach for developer velocity. It completely decouples your goals from the constraints of memory management.
[…]
In garbage collection, we don’t have to satisfy the move-to-move constraint, or borrow-to-borrow constraint. We dont have to worry about matching pointers versus values. There’s just one kind of reference, rather than Rust’s 5 or C++'s 7. 26
[…]
For example, the borrow checker can turn memory safety problems into privacy problems if one’s not careful.
[…]
Cone and Verona will allow us to explicitly separate GC regions from each other, such that we can create and destroy a temporary short-lived region before its first collection even needs to happen. By using regions wisely, one can probably avoid the vast majority of collections.
[…]
With these advances, we might be able to get GC’s development velocity advantages without the usual performance drawbacks.
https://verdagon.dev/blog/zero-cost-borrowing-regions-overview
Adding the pure keyword eliminates every single generation check in this function, making its memory safety zero-cost.
[…]
For this reason, Vale’s regions are opt-in. In fact, one can write an entire Vale program without knowing about regions.
https://verdagon.dev/blog/on-removing-let-let-mut
We’re going to commit a cardinal sin today and talk about syntax design!