3 ms·
People were asking for it. OCaml is the same age as JavaScript but had all these features from day 1. It's especially frustrating when JavaScript fans talk as t
by lmm 8y ago
People were asking for it. OCaml is the same age as JavaScript but had all these features from day 1. It's especially frustrating when JavaScript fans talk as though JavaScript had invented a language feature that in fact existed decades earlier, which frequently happens.
It's worth being aware that JavaScript is (and always has been) a long way behind the language design state of the art. That informs people's choice of language (in cases where non-JS is an option - but in these days of transpilers, non-JS is always an option). It's not a reason for people to stop improving JavaScript if they find it useful to do so, but it may be a reason to switch away from JavaScript.
- Klathmon 8y agoBut you're building a strawman there. I don't think I've ever seen anyone claim that javascript invented these features (especially not this one! It's a reference to the global scope...). People are excited to have these features in their language, they may like the JS implementation better than others or vice versa, they may talk about how much it improves the language or how it's a detriment to the language to have it included, but I haven't seen anyone claim that "javascript invented this". It's fine to want to be aware that JS isn't "state of the art" in language design, but I really don't think anyone believes that it is. (and as an aside, I don't think I'd want to use a language that was state of the art as the base for a large application, because that means that there isn't much testing or prior art to build from) But that argument also misses the point. I'm happy to talk about the pros and cons of languages, I'm happy to discuss how erlang's message passing makes some things extremely easy to develop, how python's collections make many kinds of programming much easier to read. But bringing up how other languages have had a feature "years ago" once it's arrived in javascript isn't discussing pros and cons or offering reasons to switch, it's turning tools into sports teams where you are "rooting" for your favorite. If/when JS gets pattern matching, you can be your ass i'll be in that thread comparing it to ocaml's approach, or F#'s approach to see the differences and similarities, to see the benefits of each, to see how they all fit into each languages ecosystem. But I won't be exclaiming how it doesn't matter because "other languages had this years ago!", because it doesn't help anything, it doesn't give anyone information they can act on, it doesn't discuss tradeoffs, it is just downplaying the achievements of the people that helped make it a reality.
- lmm 8y ago> People are excited to have these features in their language, they may like the JS implementation better than others or vice versa, they may talk about how much it improves the language or how it's a detriment to the language to have it included, but I haven't seen anyone claim that "javascript invented this". I've seen people say javascript invented non-blocking I/O or had the first practical implementation. I've even seen people say it was the first mainstream language with map/reduce/filter. > But that argument also misses the point. I'm happy to talk about the pros and cons of languages, I'm happy to discuss how erlang's message passing makes some things extremely easy to develop, how python's collections make many kinds of programming much easier to read. But bringing up how other languages have had a feature "years ago" once it's arrived in javascript isn't discussing pros and cons or offering reasons to switch, it's turning tools into sports teams where you are "rooting" for your favorite. That's a failure mode, sure. But being aware of where a language stands on the innovation spectrum can also help you learn more about what else is out there. If you know JavaScript is getting a feature today that OCaml had 20 years ago, you might start looking around for language features that JavaScript will be getting in 20 years' time that are available in other languages today. That's information you can act on, and might draw attention to a tradeoff you weren't even aware you were making by using JS.
- LocalPCGuy 8y ago> I've seen people Purely anecdotal, you should not base your argument on anecdotal evidence. (goes for both posts for and against in this case)
- lmm 8y agoIt's not anecdotal when all I'm claiming is that there are people who say this! There are, I've read their posts myself!
- icedchai 8y agoConsider that Javascript was invented for doing browser form validation and image preloading. Anything else is an accident.
- lmm 8y agoJavascript took a lot of design decisions that were more appropriate to a single-application embedded scripting language than a general-purpose programming language. That's not a criticism of its original designers, but it is worth knowing when choosing a general-purpose programming language.
- IgorPartola 8y agoDesigner. It was shipped in a week.
- spdionis 8y agoAnd that's what blows my mind when people write microservices in Node.