I've always wanted const params! (Haven't had time to put any kind of proposal together though). @ryanflorence
-
-
Replying to @lbljeffmo @wycats
there's an experimental flag in Flow to turn all params const. Turning it on for new projects is nice
@ryanflorence2 replies 1 retweet 3 likes -
Replying to @lbljeffmo @wycats
don't think implicit const could fly in JS though
@ryanflorence1 reply 0 retweets 0 likes -
obviously backward incompatible; nicer than const all over: shorter notation, say (=x, =y) => A*x + B*y + C
1 reply 0 retweets 2 likes -
Replying to @BrendanEich @lbljeffmo and
shorter example not as well-motivated as longer, ofc!
1 reply 0 retweets 0 likes -
people are already willing to use `const`, two more chars than `let` -- usage in params may be ok
2 replies 0 retweets 1 like -
people are hostage to mutable default binding spec which cannot change -- suggests better path, esp for =>.
1 reply 0 retweets 0 likes -
Replying to @BrendanEich @wycats and
I remember in my earliest TC39 days asking if new function forms could be const params
1 reply 0 retweets 4 likes -
Replying to @domenic @BrendanEich and
Nobody liked the "micro modes" but we kind of ended up with them anyway so ehhhh.
2 replies 0 retweets 0 likes -
Replying to @domenic @BrendanEich and
All that said, in my own code I continue to do `f(x) { x = Boolean(x); ... }` and such a lot.
2 replies 0 retweets 4 likes
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.