99 karma · joined Jun 12, 2020 (6y ago) · 45 submissions
comment 6y ago · link · parent
I introduce unused variables all the time when I'm debugging/exploring, which always get cleaned up before commit (this is programmatically enforced, which I think is reasonable), to need to go and comment out the declarations for each variable that goes unused if I comment out a section, just because some "principle engineer" somewhere on my team (or the language design team) thinks unused variables are the devil reincarnate and can't be allowed in any build whatsoever is frankly insane. (Don't even get me started on cases where commenting out the declarations changes behavior...)
comment 6y ago · link · parent
That'd actually be pretty helpful for initial prototyping, where you want to have state shared across devices but don't want to bother with hosting a backend at first, and localhost wont work because the client wants to play with it too.
comment 6y ago · link · parent
comment 6y ago · link · parent
It's concerning to me that the deno folks chose giving up on type safety over figuring out how to set up their development environment to better meet their needs.
comment 6y ago · link · parent
comment 6y ago · link · parent
comment 6y ago · link · parent
comment 6y ago · link · parent
I think JavaScript got this right where the semantic resolution steps of arguments pretty closely follow the steps for assignment, which means once someone understands the basic idea of object destructuring they get named arguments for free, in the form of destructured object parameters:
const foo = (positionalArg1, {namedArg1, namedArg2 = 'foo'}) => { ... }
foo(1, {namedArg: 'bar'})
// resolved same as
const [positionalArg1, {namedArg, namedArg2 = 'foo'}] = [1, {namedArg: 'bar'}]comment 6y ago · link · parent
https://www.jpost.com/health-science/smoking-appears-to-prot...
comment 6y ago · link · parent
comment 6y ago · link · parent