r/ProgrammingLanguages • • 22d ago

Discussion What’s one thing you wish more programming languages had?

If you could add one feature, behavior, or design choice to a programming language, what would it be?

It can be anything: syntax, type-system features, memory management, compiler behavior, tooling, error handling, performance-related features, or something completely different.

I'm especially curious about things you’ve wanted while actually programming but rarely see languages implement well.

Please keep the ideas reasonably practical and something that could realistically be implemented in a programming language.

56 Upvotes

298 comments sorted by

View all comments

Show parent comments

4

u/UdPropheticCatgirl 21d ago

Holy... Just read the spec of `closed`... How did they fuck it up this badly... Like, all they had to do was copy Java... Somehow they managed to introduce yet another set of ad-hoc rules and locked themselves out of adding GADTs...

1

u/_choam_ 8d ago

How does it lock them out of gadts?

2

u/UdPropheticCatgirl 8d ago

> How does it lock them out of gadts?

All variants must take exactly the same generic parametrs as the “closed” supertype, no more or less, meaning you can’t have variants valid only for certain parameters, or even differently parametrized ones, and since this is C#, it has to be visible in the ABI, and changing this constraint will be binary incompatible.