Succinctness Is Power (2002)
paulgraham.com
paulgraham.com
for (Iterator<Thing> it = items.iterator(); iterator.next(); !iterator.done()) { Thing t = it.current(); ... }
is worse code than for (Thing t : items) { ... }
in most cases (though there are exceptions such as if you need to call `it.remove()` or something like that in the loop occasionally).Bad succinctness is when, for the sake of shorter code, you have to introduce rather than remove concepts that are not directly related to the goal you're trying to accomplish and that cause extra mental load next time someone's trying to work with that code. To avoid saying anything too controversial, I'm sure everyone can think of their own examples here.
Yeah you can go poke around at your IDE and hover over things to see implicit types, but being able just read on the screen what everything is can be super helpful to newcomers or someone returning after a long weekend. It's also wonderful seeing the ripple of changes across the codebase as functions start returning different things, seeing explicit types update.
Ideally we could write & get the succinct form, but be saving in code in explicit form. IMHO.
I'm pretty sure that K would be an answer.
Edit: I do largely write scripts though and few programs are 10,000 lines or longer. I imagine I might struggle more with bookkeeping with an extremely large codebase. Maybe not, but I wanted to acknowledge my use may be atypical here.
I feel most productive in Swift and Julia (more so than in Common Lisp or Clojure) and some kind of a mix of those would be my ideal language.
One of the keys to productivity is how much mental effort does it take to understand the code doing some thing (for example arithmetic expressions in Lisp).
But another factor is how much skill/knowledge you must have and how much effort you must expend to do the thing.
In that light, succinct languages are often not so powerful, at least for most people, and even in expert hands power is often quite focused.