you are viewing a single comment's thread.

view the rest of the comments →

[–]fschmidt[S] 1 insightful - 1 fun1 insightful - 0 fun2 insightful - 1 fun -  (3 children)

You are obviously complete modern scum and I regret sharing the same planet with you. What you are saying is just fucked up beyond belief. Why should arrow functions behave differently from regular functions, that just makes things more confusing. Yes the "this" problem is old because Javascript should never have had object-oriented features like this in the first place. But at least the scum who added "class" could have fixed this issue within a class since this was new. But no, of course they didn't do this since they are depraved modern scum. The correct solution is mine, to reject all this disgusting crap and build objects strictly based on closures and not class-based nonsense.

[–]package 2 insightful - 2 fun2 insightful - 1 fun3 insightful - 2 fun -  (2 children)

Bro lmao why are you so attached to old js? Literally everyone hated old js when it was the norm, exactly because there were tons of weird quirks regarding scope, lifetimes, and mutability. Arrow functions specifically are made for callbacks and control inversion scenarios where the existing scope is more relevant than the function's own scope, which just so happens to be 99.999% of scenarios where you make use of anonymous functions. Word of advice if you're this far behind in your js skills and hate modern features, definitely avoid reading about async/await and the Promise monad; your brain will probably melt.

[–][deleted]  (1 child)

[removed]

    [–]Vulptex[A] 1 insightful - 1 fun1 insightful - 0 fun2 insightful - 1 fun -  (0 children)

    This comment is also removed for advocating violence.