5 ms·
I hope someone pointed out that it's legacy JavaScript that's too complicated. Very modern JavaScript is quite a bit _less_ complicated.
by spankalee 7y ago
I hope someone pointed out that it's legacy JavaScript that's too complicated. Very modern JavaScript is quite a bit _less_ complicated.
- tyingq 7y agoHard to make that as a blanket statement. I don't know that I've seen two different teams assemble the same pieces for a React stack.
- tenaciousDaniel 7y agoSo we just switched from Angular 1 to React. We decided about a year ago. So I spend a year writing side projects in React and Redux. In the meantime, a new dev was hired to begin writing the React/Redux code. I just jumped into his code today and tried to add my own stuff, and I feel like I'm learning programming all over again, because it looks like absolute gibberish compared to the code I had been writing on the side. So even if you are using React and Redux, you can write code that has virtually no resemblance to another repo. It's insane.
- mosdl 7y agoRedux forces you to write lots of ugly boilerplate, its the same way in all code bases that use it.
- davidjnelson 7y ago// reuse this export const createAction<T>(type: string, payload: T) => { return { type, payload }; }; // some component onClick={event => dispatch(createAction<SomeInterface>(TYPE_CONSTANT, event.target.value))} Where’s the boilerplate?
- moon2 7y agoIMO, 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.
- rrrich 7y agoI think there are a lot more barriers to entry, in terms of if you haven't worked in JS much previously. Meaning, pre-Webpack/Babel/ES6 Modules etc, it was just JS and so newbies could learn JS and then go from there. Now, there's a bigger learning curve in the initial stages, I believe.