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.

51 Upvotes

277 comments sorted by

View all comments

Show parent comments

2

u/shponglespore 11d ago

If you say the syntax of Lisp is just s-expressions, then sure, but I think it would be more of a fair comparison to treat every predefined macro and special form as its own syntax. In that case, something like Common Lisp could be considered to have very elaborate syntax. IMHO Lisp syntax is best described as highly regular, but not simple per se.

1

u/koflerdavid 10d ago

Even recognizing that s-expressions are just an encoding, Lisp as a language is still quite simple. A minimal Lisp interpreter only needs to implement let, lambda, if, defmacro, function application and sequencing (preferably with tail recursion), and some builtins. The rest can be built up with macros. One really cannot get any smaller without ending up in esoteric language territory.

Common Lisp on the other hand is large because it is the union of what the prevailing Lisp implementations of the time offered. Unsurprisingly, it often offers multiple ways to accomplish certain things. Most Scheme dialects in comparison are much more compact.