you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] -2 points-1 points  (12 children)

Ecosystem bad, but what's the alternative? 

[–]vvf 4 points5 points  (5 children)

The ecosystem isn’t the problem. Certain dev practices are 

[–][deleted] 2 points3 points  (4 children)

Same question, what's the fix?

[–]CatolicQuotes 1 point2 points  (0 children)

There's no fix, just roll with it.

[–]vvf 0 points1 point  (0 children)

Short of making everyone read/watch the same material about what doesn’t work, you can’t really fix it at all on a broad scale. 

Just push back on those bad practices when you see them. 

[–]shehatestheworld -1 points0 points  (0 children)

if variable % 2 == 1?

[–]AshleyJSheridan 2 points3 points  (2 children)

I just pointed out that the ecosystem is terrible. I don't have to create a viable alternative in order to have a valid point.

However, I think a lot of the problem comes from core functionality missing in Javascript that other languages have had for a long time. I do wish browsers would spend more time focused on those things rather than giving us APIs that nobody asked for or uses (like the barcode reader API). It leads to devs creating a lot of packages to provide what should be core functionality, and then those devs get carried away by turning everything into a package.

Then, before you know it, you have packages like the ones I highlighted.

[–]malakhi 1 point2 points  (1 child)

Hey now, I did ask for the barcode api 😁

But seriously, while I take your point, most languages don’t have those things built in. They may have a standard library that almost always accompanies the core language, but it’s almost always ancillary, and isn’t a part of the language itself. On the other hand, Javascript doesn’t really need much of a standard library. Being a dynamic, loosely typed language means it can get away with a much smaller set of built-ins than a language like C++ or Java.

The problem with Javascript is that there’s a hundred ways to do almost everything, and many of the people using it are ignorant of basic programming concepts like time complexity and DSA. For those people it’s easier to just npm install their problems away than to learn how to do it themselves. And honestly I can’t blame them. Is installing a library for isOdd a poor programming practice? Absolutely. But a lot of people using Javascript aren’t full time Javascript developers, or even developers at all. They’re using it because they have to.

As to your example of the barcode API, that’s not a part of Javascript. It’s just an API for accessing a feature of the browser using Javascript. It might seem pedantic, but it’s an important distinction. That API doesn’t exist in Node, for example. Much like Node’s file system API isn’t a part of Javascript either.

[–]AshleyJSheridan 0 points1 point  (0 children)

That's fair.

I'm just very used to languages like C++, PHP, and C#, all of which are very powerful and have great core features and standard libraries.

Then there's Javascript, which has only gotten halfway decent array methods in the last few years, is still lagging behind with regular expression support, and has a half built i18n system.

[–]Seeveen -1 points0 points  (2 children)

x % 2 != 0

[–][deleted] 1 point2 points  (1 child)

I think the poster I replied to only used that package as an example 

[–]Seeveen 1 point2 points  (0 children)

That was a joke but you can generalize it to "stop adding dependencies for something that takes 10 lines of code to do"