Worst ideas/features in programming languages?
Hexagonalstar64 at gmail.com
Tue Oct 12 14:06:10 UTC 2021
On Monday, 11 October 2021 at 15:59:10 UTC, Atila Neves wrote:
> I'm brainstorming about what I'll talk about at DConf, and
> during a conversation with Walter I thought it might be cool to
> talk about:
> * Worst features implemented in a non-toy language
> * Worst features (in your opinion) in D
> * Features you'd like to see in D
> Ideas? Examples?
Not necessarily a feature, but I think the absence of hindley
milner type inference is a big one. I think that statically typed
languages should adopt it or at the very least be influenced by
it unless they have a really good reason not too.
Types are completely optional in (vanilla) hindley milner. You
can write code that looks like python and still have all the
benefits of static typing. It also infers the most general type
for the code you write. This makes your code as generic as
possible unless you add a type annotation to make it less generic.
I also think that it can help in language design in general. Weak
typing and subtyping, features that are generally disliked are
incompatible with hindley milner. It gives good answers to what
the type of a null pointer and an empty array are without
resorting to void pointers and void arrays which feel hacky.
More information about the Digitalmars-d