4 ms·
I think I agree with most things except easy to learn... Every time I want to get back into programming, the complexity of javascriot frameworks, the infinite v
by NikolaNovak 5y ago
I think I agree with most things except easy to learn... Every time I want to get back into programming, the complexity of javascriot frameworks, the infinite variety of ephemeral choices, bounces me right out.
Of all programming languages now and past, javascript as it is used today (as opposed plain language) would not be my first choice for "easy to learn". I feel there's huge effective gatekeeping with it but that's just an outsiders perspective :-/
- austincheney 5y agoI choose to ignore the frameworks for that very reason. This line of thought makes me far less employable but then why would I want to work a job I hate only to drown in weak unnecessary abstractions and all the defects and poor scale that come from that?
- axiosgunnar 5y agoI agree that frameworks might be a challenge. I would consider learning full-blown frameworks (e.g. React) pretty much like learning a new language, especially since JSX is a new syntax (albeit it's pretty much HTML). Regarding React, I consider the "hooks" coding style to be INCREDIBLY ergonomic and have been wondering sometimes if React-like "hooks" could be used elsewhere, esp in other programming languages. Or does that only make sense with UIs?
- joshum97 5y agoI think React hooks would fit nicely anywhere you need incremental computation, and a compiler is the first thing that comes to mind. They’re made for efficiently updating the output (DOM) in response to small changes in the input (sum of past user actions). If you can format your problem like that, based on a component structure, a similar API might be a good fit.
- moshmosh 5y agoHooks are class-declaration except your properties and methods are read FIFO in declaration order, rather than by a lookup table. Unless you really like the FIFO part of it, OO languages all have that already.
- axiosgunnar 5y agoBut what I meant that I liked about hooks is the "automatic rerender" in React, the reason this feature is called "hooks". I'm not sure simply declaring a method on a class would be the same?
- moshmosh 5y agoIf you operate under the same restrictions as React (single-threaded, you must call a setter method to modify properties rather than accessing them directly, code outside your class is responsible for deciding whether to call its "render" method) then yes, it's the same. Change any of those and it gets harder in basically the same way it would for Hooks if any of those changed.
- dragonwriter 5y ago> Hooks are class-declaration except your properties and methods are read FIFO in declaration order, rather than by a lookup table. React Hooks are equivalent to React class components all of whose state management is done through setState, but with the difference you describe. Personally, I find hooks more natural than classes whose state management is done exclusively through setState, but that’s obviously a big YMMV.
- kodah 5y ago> I think I agree with most things except easy to learn... Every time I want to get back into programming, the complexity of javascriot frameworks, the infinite variety of ephemeral choices, bounces me right out. The Javascript ecosystem is dismal. It's very disparate and there's a million ways to do one simple task, compounding that is that things that sound like simple tasks, like rendering a page, are actually not. If you want a place to start, where the ecosystem is fairly beginner friendly and consolidated, checkout Vue and Nuxt.js. I recently explored every possible frontend for Go that I could find: desktop, web, or otherwise. The fact is that HTML, JS, and CSS still produce the best experience for the end user. Vue and Nuxt made it really easy to produce a hybrid Server Side Rendered and Client Side Rendered (aka Universal) app with still a significant amount of effort, but with that effort directly improving my UI rather than my build environment or configuration.
- no_wizard 5y agoI think this is true when you just constantly reach for frameworks. It’s fine to do so, but knowing the core primitives of the language and the DOM can get you very far without having to reach into a bucket of libraries from npm. As for bundling, there was and will always be tools, people like to think it was just throwing script tags onto a page before npm and the modern packaging ecosystem happened but that’s not really true. At the heigh of jQuerys popularity there were (and are) entire CDNs devoted to serving it and its plugins (which many evolved to serve all kinds of different pre-packed JS bundles) as was a myriad of concatenation tools that even pre-existed before nodejs I remember namespacing and dynamic loading tools too. I can’t remember their names anymore but this is not a new thing. It’s always been volume and choice. It’s much bigger today than it was back then but it’s always been this way as far as I can remember
- austincheney 5y agoYou are misusing the word simple. Simple means fewer, which is quite different from easy which means low effort, straight forward, or less learning.
- kodah 5y ago
- matsemann 5y agoIt's nothing compared to Python, I feel. I'm trying to get up to date there now, and just this week two different runtimes were announced. There are X different projects for type checking. Django isn't hot anymore, so there's now all kinds of smaller libraries to piece together instead. To get going you have to start messing with pyenv (not to be confused with pyvenv which is deprecated), venvs etc. The official tutorials leave much to be desired, lots of newer language features aren't even mentioned, and the docs act like a reference (which is understandable) but a bad learning tool, if you're lucky and not just being pointed to a technical PEP. Like, I know it has a syntax for decorators, but the only mention of that in the official docs I stumbled upon was the syntax definition of the language. Of all languages I've had to learn in my professional career, Python has been the hardest. Not because it's a hard language, but because I have to hunt for what to actually learn.