9 ms·
"very good Javascript programmers can be significantly better in a better language." This is not how it works. Take this idea that JavaScript is a "badly desi
by jugularkill 9y ago
"very good Javascript programmers can be significantly better in a better language."
This is not how it works.
Take this idea that JavaScript is a "badly designed language" out of your head and understand that about 99% of JavaScript's behaviours are intentional.
The majority of gotchas in JS are shown by people who don't understand type coercion, prototypes or who expect it to behave like x language.
It is not just misunderstood by your average Joe JS dev, but also by many who claim to be pros and experts.
JavaScript is a language that doesn't tell you how to do things, there are no constraints. This is why so many people suck at it.
They want to use statically typed classical inheritance constraints on a language oriented around higher-order functions, coercion and literally everything being an object.
If you are somebody who is intuitive enough to create your own restrictions on what to use and what not to use in JS from the POV of the language's architecture then you will love it.
If you are convinced that there is already a holy grail structure to programming languages then you will always have problems with JS.
TypeScript is miserable. I see people building libraries in TypeScript and it's sad because they will never know how much better their performance could be or how small their lib size could be because the can only think in OOP.
OOP languages are already hugely problematic when it comes to complexities. So imagine how overly complex the JavaScript eco system is becoming due to a generation of developers who want it to be more like x OOP language it does not have the foundation to be like.
There is no defacto solution for software engineering everything still sucks, and nobody remotely has it figured out.
- eitland 9y ago> Take this idea that JavaScript is a "badly designed language" out of your head Respectfully, no. The impressive thing about it is it was written in 3 weeks. Edit: I also didn't say Javascript was a badly designed language, at least not in the post you replied to. The rest of it is like PHP (yes, I have programmed a fair bit in that as well). > and understand that about 99% of JavaScript's behaviours are intentional. So much worse ;-) There is one good defense for Javascript IMO and that is it was made in a very short time. Intentionally leaving in a heap of footguns like Javascripts type coercion isn't brilliant, it is either pragmatic, myopic or evil. I say pragmatic in this case. > The majority of gotchas in JS are shown by people who don't understand type coercion, prototypes or who expect it to behave like x language. The classic Perl defense I'd say: ~you don’t understand the beauty of it. > TypeScript is miserable. I see people building libraries in TypeScript and it's sad because they will never know how much better their performance could be or how small their lib size could be because the can only think in OOP. Well, every thing you can do in JS you can also do in TS. In a sense you can say this is our implementation of what you said above: "If you are somebody who is intuitive enough to create your own restrictions on what to use and what not to use in JS from the POV of the language's architecture then you will love it." And here you are right: Typescript is quite a lovely language:-) Also: By this logic we should be programming in assembly.
- deleted 9y ago[deleted]
- jugularkill 9y ago> It was written in 3 weeks Actually 10 days, with 22 years of development, but that has nothing to do with how it fundamentally works. > The rest of it is like PHP Are you joking? Ok so, JavaScript is a prototype based language PHP is (now) an OOP language. They are not remotely the same with the exception of dynamic types and even that is nothing like PHP due to the nature of JS engines like V8. But because if the prototype system it can emulate classical OOP. JavaScript is also a higher-order language which mean it is a psuedo-functional programming language. PHP and JS could not be further apart. > The classic Perl defense I'd say: ~you don’t understand the beauty of it. It's not about beauty, I'm saying that most people who think the language is making mistakes or doing something wrong just don't understand how it works. They blame it for their lack of knowledge. > Well, every thing you can do in JS you can also do in TS. But that's not why people use TypeScript, they use it to do TypeScript styled things. > what you said above: ~ intuitive enough to create your own restrictions That's the problem, TypeScript comes with a bunch of constraints, that's its purpose. Yes you can choose to use them or not. You could also buy a new phone and throw it off a cliff, but that's not generally why people buy phones. > Also: By this logic we should be programming in assembly. Assembly serves a purpose well, so does JavaScript. I'm just saying rather than trash things why not learn them first properly.
- matchbok 9y ago> TypeScript is miserable. I see people building libraries in TypeScript and it's sad because they will never know how much better their performance could be or how small their lib size could be because the can only think in OOP. And once that lib gets larger then 4 files, it becomes slower and slower to maintain, because JS. Spinning up new devs on any large JS project is a pain. Typescript, no problems. Lib size differences are ~0.