--

Hi Bannister,

Thanks for your comment. I disagree with you, and I'd suggest you try it out for yourself.

I find that junior developers tend to use terrible varible names, and destructured objects force them to use descriptive names.

Compare `function roundNumber(number,decimalPlaces)` to `function roundNumber({number,decimalPlaces})`.

A junior developer is almost certainly going to hand me some garbage code reading `roundNumber(n,d)` without a code comment with the first version.

But with the latter, I'm enforcing descriptive names on myself and all the other developers, so I'll get code that reads `roundNumber({number,decimalPlaces}`. That's easy to understand.

--

--

Dr. Derek Austin 🥳
Dr. Derek Austin 🥳

Written by Dr. Derek Austin 🥳

Hi, I'm Doctor Derek! I've been a professional web developer since 2005, and I love writing about programming with JavaScript, TypeScript, React, Next.js & Git.

Responses (1)