5 ms·
I'm alone in this but I prefer `let` over everything else unless it's something like Redux action strings, database connections strings, or anything of the like
by sotojuan 10y ago
I'm alone in this but I prefer `let` over everything else unless it's something like Redux action strings, database connections strings, or anything of the like. I rarely use `const` for the ridiculous reason that I find it too long (5 characters!). `let` is short and reads nicely and my programming style in general never mutates stuff anyway (I use Ramda/always return new data).
That said, `const` is picking up to be the default for everything. I can definitely see good reasons to use it when declaring functions and required modules or working in a team.
- nemild 10y agoI'm curious why you let the amount of typing dictate what you use? If five characters is such an impediment, why not just use a snippet letting you have less error prone code than currently (e.g., 'co ' expands to const).
- garyclarke27 10y agoAs you admitted, your behaviour is rediculous, hope for your sake, your boss or customers don't read this.