3 ms·
It's an incredibly verbose way to do what you'd prefer to be the default. val or con would have been better.
by aaron-lebo 9y ago
It's an incredibly verbose way to do what you'd prefer to be the default.
val or con would have been better.
- BurningFrog 9y agoYeah, those 60% extra characters do bother me. And the uneven indentation. I know some/most people don't care. I can't be one of them. Maybe we'll get `val` in ES9.
- simonbw 9y agoIs there really much of a difference between "const" and "con"? I get that one is 66% longer than the other, but does it actually affect the readability of the code or the amount of time it takes to write it?
- kazinator 9y agoCan't we compromise half way? How about cons! /whistle .../
- WorldMaker 9y agoGoing way back to ancient Lisps `let` has been the const declaration in a lot of programming languages. It's too bad ES2015 decided to use `let` for `var`/`val`, because `let` should have been const. That said, I've come to terms with const, even if I find I accidentally use let sometimes from time spent in Lisp and F#.
- kazinator 9y agolet is not a "const declaration" in most major dialects of Lisp, current and historic. In Scheme, Common Lisp, ISLisp, Emacs Lisp and others, it introduces mutable bindings.
- WorldMaker 9y agoApologies, my Common Lisp is getting rusty.