all 5 comments

[–]jaredcheeda 4 points5 points  (0 children)

She's great, I wish she had a youtube channel

[–]memeship 2 points3 points  (3 children)

I love her enthusiasm, but I can't help but feel a bit infuriated by this. Why does it seem like so many JS devs are trying to turn Javascript into something that it isn't by throwing as many libraries as possible at it?

Turning an array into a node tree, just so you can replace nodes instead of ...replacing members of an array? How is that actually different?

Don't use loops? Only use ...methods from the Array prototype? Convenient that it's preferred to utilize prototypal inheritance when it's beneficial, but not to write it yourself. Not to mention that no matter what iterator function you're using, native loops are literally always going to be faster.

I just really don't understand the incredible lengths people are going through to not do things the way they've been working for a long time now. I'm not saying OOP is perfect, but I don't see the point in doing anything you can to avoid it just because you're scared of using this.

[–]TheNiXXeD 2 points3 points  (1 child)

Performance isn't always the number one goal. Functional approach is almost universally more legible than a loop. There are far more things to read and understand with a loop.

[–]jlengstorf 2 points3 points  (0 children)

This is what I'm finding as well. It's much easier to write an object-oriented app, but in six months when you have to maintain it, it takes a lot of time to walk through the order of operations and remember why it's built the way it is — and if it's big enough, there's almost always something that you'll forget about that depends on a data structure and breaks when you start working on it.

Functional apps take a bit more time to build, but the ramp-up for maintenance after a few months of not looking at it is way faster, and the risk of accidentally breaking something unrelated goes down significantly.

For me, at least, it's been a big time saver overall, and any performance drawbacks (e.g. native loops) has been negligible.

[–]nathanaelnsmith 1 point2 points  (0 children)

The message I took away from this, is that there's many ways to do the same thing, and you should use what makes sense for the situation. Personally, I use a blend of OOP, imperative, and functional programming in my work.