Comment

Comment by overgard

So like, I guess the thing I don't understand is this: why do people think writing:

some_array.has_my_thing() is better than has_my_thing(some_array). ?

The former, the extension has so many issues, it messes up namespacing, it's unclear where it came from, etc. etc. The latter is just a function. It's not longer, or complex, it's just more straightforward. I really think things where you extend or override built in types is almost always just a bad idea, because the alternative is almost always just as concise and doesn't confuse everyone.

parent overgard 4 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton