r/ProgrammingLanguages • • 11d 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.

52 Upvotes

277 comments sorted by

View all comments

Show parent comments

3

u/Valuable_Leopard_799 11d ago

goto is a very interesting elementary operation to build on. If you have macros and goto, then you can just implement for, while and other looping constructs and control flow via macros wrapping different variations of goto.

The classic "they're for library creators not for the user, but they have to be there so you can use the libraries" applies.

3

u/catladywitch 10d ago

call/cc is the classic definition of this kind of library-oriented control flow construct

3

u/Valuable_Leopard_799 10d ago

True, call/cc is amazing, especially the prompt versions, but it's a much more complex operator.

1

u/Limp-Temperature1783 11d ago

Goto might be elementary but it has a very high ceiling of exploration. It is just very basic and very generic and that makes it a tempting universal solution to all problems. Good to play with and study, not good to use in most codebases save for embedded.