I've been a professional C, Perl, PHP and Python developer.
I'm an ex-sysadmin from the late 20th century.
These days I do more Javascript and CSS and whatnot, and promote UX and accessibility.
I find short circuits, destructuring and arrow functions seriously hamper javascript's readability.
When I read desrtuctured parameters like:
functiontest({name}={}){
or shorted function calls, like:
mapping[key]&&mapping[key]();
or arrow functions without parens, like:
constisAnimal=animal=>{
They all make me have to stop and think, "what does this do?" They're too similar in appearance to other forms that it's getting harder and harder to scan through code.
I use a lot of these techniques myself (though I rarely work in Javascript) but I favour readability rather than trying to achieve as few characters as possible.
I've been a professional C, Perl, PHP and Python developer.
I'm an ex-sysadmin from the late 20th century.
These days I do more Javascript and CSS and whatnot, and promote UX and accessibility.
I've been coding for over 20 years now! (WOAH, do I feel old)
I've touched just about every resource imaginable under the Sun (too bad they were bought out by Oracle)
I find short circuits, destructuring and arrow functions seriously hamper javascript's readability.
When I read desrtuctured parameters like:
or shorted function calls, like:
or arrow functions without parens, like:
They all make me have to stop and think, "what does this do?" They're too similar in appearance to other forms that it's getting harder and harder to scan through code.
I use a lot of these techniques myself (though I rarely work in Javascript) but I favour readability rather than trying to achieve as few characters as possible.
Shorter code has better readability, given you use good naming conditions.
Sometimes it does, sometimes it doesn't; I don't think you can say that as a rule.
True...I just think there's more pros on that note.
github.com/airbnb/javascript#destr...
We've essentially gotten to the point where we use more symbols than statements, which is becoming worse than ASM.