3 ms·
Right. But in almost all cases I'd prefer to do away with it entirely, and not encourage extra variables for the sake of usage. It makes code more ambiguous (fo
by bpicolo 10y ago
Right. But in almost all cases I'd prefer to do away with it entirely, and not encourage extra variables for the sake of usage. It makes code more ambiguous (for anybody not coming from javascript and being used to it)
- kevindqc 10y agoHow does it encourage to use extra variables? If you have a variable with the name use it, otherwise do whatever you usually do like calling a function. It doesn't encourage doing something like const id = getId(); let obj = {id, otherProp: 'something'}; vs let obj = {id: getId(), otherProp: 'something'}; ?
- bpicolo 10y agoRight. The real argument is I don't like the additional ambiguity. For me, it doesn't seem like a particularly ergonomic syntax choice.