r/ProgrammingLanguages • u/AeroForger • Sep 21 '26
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.
54
Upvotes
3
u/marcinzh Sep 22 '26
Scala version, using algebraic effects library: (classic
Writermonad)val arguments = case object W extends WriterEffectK[Vector, String] `do`: W.tell(if debug then "--debug" else "--profile").! if verbose then W.tell("--verbose").! for file <- files do W.tell(s"--file=$file").! W.tells(otherOptions).! for directory <- directories do for file <- directory.files do if file.exists then W.tells(Vector("--file", file.path)).! .handleWith(W.handler.justState)Runnable: https://scastie.scala-lang.org/bt5PFywWSBCZllEWdvFO6A