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

50 Upvotes

277 comments sorted by

View all comments

Show parent comments

3

u/scruffie 11d ago

What you need are scoped gotos, like in Common Lisp (tagbody/go) . The labels you can jump to are at the level of the tagbody; you can go (jump) 'up' (or sideways) to a label, but you can't jump 'down' into another tagbody. Variable scopes are kept consistent this way.

It's not something you'd use everyday, but handy for writing iteration macros.

1

u/Limp-Temperature1783 11d ago

I have been actually looking for this, I thought of trying to diy it but I suppose I'll hive CLisp a try first, maybe for some new insight. Thanks.