3 ms·
What’s wrong with var a = ...; a = a.project(); a = debug(a); a = a.eject();
by EGreg 7y ago
What’s wrong with
var a = ...;
a = a.project();
a = debug(a);
a = a.eject();
- pcr910303 7y agoThat can’t show the programmer’s intent whether it is mutation (e.g. a = a + someNum) verses defining a new variable with different types (but has a similar meaning so has a same name) (e.g. someKindOfData = [...someKindOfData]) Rust allows this, and it really clears codes up. I don’t have to make up different identifiers for same data but different representations. (e.g. I would do the above code in JS as... someKindOfDataAsArray = [...someKindOfObectAsNodeList])
- deleted 7y ago[deleted]
- EGreg 7y agoWhat are you talking about, LOL