7 ms·
Kind of based on an assumption that using JavaScript at all is a good thing. For me the idea is to avoid using it where possible. Can we stop the web monopolisa
by CmonDev 12y ago
Kind of based on an assumption that using JavaScript at all is a good thing. For me the idea is to avoid using it where possible. Can we stop the web monopolisation/locking/despotism and drop specific languages from titles and ideas? How about "Isomorphic Applications that give developers freedom and a choice of language"?
- pluma 12y agoEvery language sucks. Every language is hated by at least one person (unless it is entirely irrelevant and people who would hate it just ignore it). There is no perfect language and there never will be. If anything, JS is a better "lowest common denominator" than similar languages because a) every browser already supports it (ask Microsoft (VBScript) or Google (Dart) about the success of replacing JS in the browser) and b) it is a compilation target for various other languages (including Haxe, Dart, Java, Scala, OCaml, Haskell, Go, ClojureScript, LiveScript, Elm, various flavours of Ruby and Python, as well as JVM and LLVM based cross-compilers) -- and thanks to amd.js the generated code can be insanely optimized compared to hand-written JS. I'm not going to regurgitate the tired "JS is the new Assembly" meme, but with the web still being the shared platform for all (smart) mobile and desktop devices and JS being the only language consistently supported by and easiest to deploy on all of them (via the browser), it certainly has earned its place. With replacing JS in the browser (i.e. on most devices that have a browser) having failed numerous times (even more if you include plugins like Java, Shockwave, Flash, Gears and Silverlight), it makes sense to try to use JS on the server instead of continuing to try to make the browser use server-side languages. But regardless of the language, calling for the use of one language (in one flavour) for both the client and the server is by definition a step towards monopolisation. Unless you have a shared compilation target (like asm.js?) you can't have "freedom and a choice of language" when developing isomorphic code.
- frowaway001 12y ago> Every language sucks. Every language [bla] Oh, another instance of "all languages are equal". No they are not. Some are better, some are worse. People who don't want to use JavaScript, try to avoid one of the worst languages out there. That's all.
- pluma 12y agoI'm not saying all languages are equal. In fact, I have a pretty strong opinion when it comes to PHP (and the majority of core developers involved in it until Facebook decided to intervene). I thought JS was ridiculous crap when I first encountered it in the nineties. Then again, I still thought XHTML 2.0 was a brilliant idea well into the noughties. It took me a journey through PHP, Java, ActionScript (both 2 and 3) and Python (with a short visit to CoffeeScript) to rediscover it and fully appreciate what modern JavaScript has become and what beauty lies therein. I would love to hear a more detailed explanation of why you think JavaScript is unsalvageably bad, but so far all I hear are baseless assertions.
- CmonDev 12y agoSuch beauty: http://wtfjs.com http://wtfjs.com
- pluma 12y agoOh, come on now. Most of these are edge cases of passing in invalid data into functions that try to make sense of it, using discouraged functionality (e.g. not using strict-mode or using obscure parts of the language that are only supported for backwards-compatibility) and the rest shows just a complete lack of understanding of the language. One of the "WTFs" is `"true" == true` being false. Double-equals comparison being discouraged aside, the only language in which I would expect that to be true is PHP. Another is about `getElementById` -- that's not even about the language, it's about the DOM (which has WTFs of its own right and still would have them if you used a different language in the browser). If you want a good laugh about JS, I recommend Destroy All Software's infamous WAT talk (which also contains some Ruby).
- pkroll 12y agoAll languages are not equal, but "better" or "worse" depend on the opinion of the person asked much more than you're implying.
- frowaway001 12y ago
- deleted 12y ago[deleted]