top | item 32072879

(no title)

FlorianRappl | 3 years ago

The comment reads like you used JavaScript 10 years ago. For instance, just use arrow functions and this remains untouched.

discuss

order

labrador|3 years ago

I know but that's just bizarre. One function has it's own this and another doesn't so if my arrow function gets big and I want to make it a regular function I may have to rewrite it. Ugh.

Edit: I'm thinking of cognitive load too. I like to eliminate load I don't need. Keeping track of this is not something I want to do with my life

https://drpicox.medium.com/reducing-programmers-cognitive-ov...

chmod775|3 years ago

> so if my arrow function gets big and I want to make it a regular function I may have to rewrite it.

There's absolutely no reason to make an arrow function a regular function just because it goes past a certain number of lines.

It really seems like you should become more familiar before forming an opinion. There's valid criticism to be made, but those aren't it.

arcosdev|3 years ago

or, better yet, stop using this