3 ms·
IMO, there are two big problems with Javascript: - there are too many ways to do something: it's hard to understand patterns (they change with every framework,
by moon2 7y ago
IMO, there are two big problems with Javascript:
- there are too many ways to do something: it's hard to understand patterns (they change with every framework, for example), many different standards that aren't compatible with each other.
- javascript delays failure and fails silently: it makes software prone to bugs as well and it also makes the language hard to debug.
NodeJS, npm, yarn, millions of frameworks and libs just add complexity to the language.
- bstar77 7y agoAll of this can be addressed with best practices. Just enforcing lint rules can mitigate the majority of your complaints. Flow and Typescript can take that even further. Webpack will streamline your process. My primary complaint would be that working in Javascript is absurdly difficult for the beginner. It's ridiculously hard to understand the fundamentals when they have been a moving target since the early 2000's.
- reaperducer 7y agoAll of this can be addressed with best practices The problem is that "best practices" changes every day, and from one employer or team to another.
- eropple 7y agoI don't agree with this. Over the last few years I've watched the JS universe coalesce largely around three points: - Structural, optional typing is good. Use it. TypeScript seems to have de facto "won", but just use something; the very act of thinking about input and output types tends towards better code and you always have the flexibility, within your module boundaries, to go outside the type system if need be. - Structured, functional-or-mostly-so view libraries make your system less fragile. Use them. React, Vue, whatever. They discourage your developers from making tag soup; this is a good enough reason. (Yes, there are some people on the "vanilla JS" train, but there are reasons it's a minority group--it's harder, you run the very real risk of making a worse thing, and there's less out there to bail you out if you get yourself into a corner.) - Do the work up front: lint aggressively, format consistently, run coverage tests, and so on. It's an investment in correct code, and get in the habit early. What you use matters less in putting into effect good practices. Why you use it and what they do matter much more.
- hoten 7y agoI'm afraid the "javascript sucks" meme has taken hold. The infection is terminal now. At least, in the minds of most developers judging web development from the outside.
- eropple 7y agoI mean, from the outside I get it. For a very long time I avoided frontend jobs because JavaScript did suck. And I'd say that JavaScript-as-it-was--not writing ES6, not polyfilling browsers, not using a sane framework--sucks today. These days I write pretty exclusively NestJS serverside and React/React Native on clients, using TypeScript through the whole stack and Swagger-generated clients for plumbing, and it definitely no longer sucks. But I had to 1) have a reason to get into it, and 2) spend a ton of effort to weld together a consistent environment that values developer time. There probably is too much nonsense going on at any one point in the JavaScript ecosystem. I mostly work in infrastructure/devops roles, where it's just expected that you know ten thousand little things that are arbitrary and stupid but will eventually bite you; having to hold an entire stack in my head and understand how to pivot and manipulate it is kind of what I do everyday, but it's not a standard programmer skill. If you don't have somebody who can do that--and it's a mixture of human communication and empathy, technical skill, and a certain kind of technical taste, so it's not as common as one might like--I still, today, see why somebody might say that JavaScript sucks.