Modern programming languages require generics
ayende.com
ayende.com
> A modern language that is aiming for performance should take this very important aspect of language design into account.
could have been rewritten as
> A language that is aiming for performance should take this very important aspect of language design into account.
and been clearer and more objective for it.
For example, languages of a certain generation didn't have community archives. Python was born at the transition, and suffered for years with multiple dysfunctional ones. Ruby got gems because of that "don't be Python" cautionary tale. A language of the current generation, putting forth that older story of "people can just put up their code whereever, and no doubt someone(s) will likely make a list(s) of those" might reasonably be described as "not modern".
Software engineering, and language design, reflect a great deal of "you say we've known how to do this better for years... but, well, shrug". Ratcheting up the bar on "modern" seems one way our community achieves its oh-so-slow progress.
With an emotional vibe of "open sewers on streets, regardless of their historical precedence, low build cost, and current prevalence, are something we just shouldn't be doing nowadays."
Here is the specification: https://github.com/oberon-lang/specification/blob/master/The...
Here is a discussion why it is designed like this: https://oberon-lang.github.io/2021/07/17/considering-generic...
[1] https://ziglang.org/documentation/master/#comptime "Compile-time parameters is how Zig implements generics. It is compile-time duck typing." [2] https://ziglang.org/documentation/master/#import [3] https://ziglang.org/documentation/master/#void "By using void as the type of the value, the hash map entry type has no value field, and thus the hash map takes up less space. Further, all the code that deals with storing and loading the value is deleted, as seen above."
Doing so at type / function level allows to introduce them gradually and with low ceremony, compared to parametrized modules (likely you mean OCaml here?). Gradual approaches seem to work best in real world, hence the prevalence of generic functions and parametrized types.
No, I was thinking of Ada or Oberon+. Here is a discussion: https://oberon-lang.github.io/2021/07/17/considering-generic...
This feels like a weird assertion, especially when immediately followed by an example where such manual specialization happens
Basically the theory behind the Futamura projections.
I’m sure you could write some code which could keep an abstract interpreter or however type checking is implemented busy forever especially with a dynamic language with eval but, you know, you get what you pay for.
Or I’m completely wrong since I just read about this stuff for fun…
There are very real advantages in the use of the fewest languages that cover your spectrum of problems. If you can limit the spectrum of languages you use to, for instance, Typescript (with react native on mobile), SQL, and Kubernetes config YAML, it's a big win for productivity and growth.