7 ms·
I'm disappointed. Where is the innovation? We'll be stuck with JS forever.
by msie 12y ago
I'm disappointed. Where is the innovation? We'll be stuck with JS forever.
- shurcooL 12y agoYou can use Go and compile it to JavaScript. I've been doing that the last year. I gave a talk about it recently if you want to see. https://www.hakkalabs.co/articles/getting-started-gopherjs https://www.hakkalabs.co/articles/getting-started-gopherjs
- Zergy 12y agoYou can also use C++, Java, Kotlin, C#, or almost any popular language. Compiling to JS is not an innovation its a hack and a testament to how terrible the language and ecosystem is.
- timepiece 12y agoIt's more of a testament of the intellectual laziness of some devs to pick up the language and put real efforts to master it.
- tobltobs 12y agoFollowing your logic, all "masters" should code in assembler?
- mastazi 12y agoNo major language implementation that I'm aware of compiles to assembly. Maybe you are referring to machine language and/or bytecode, which are not targeted at humans, so the 'masters' should not code in them because the 'masters' are humans. Advanced Javascript has many capabilities such as first-class functions and great introspection because of the way objects are. The fact that there is a lot of shitty js code around doesn't make js a shitty language, just like the tons of shitty C from our Commodore-64-childhood don't make C a shitty language.
- shabble 12y ago> No major language implementation that I'm aware of compiles to assembly. I believe 'gcc -S' would demonstrate not. If my understanding is correct, it produces essentially asm internally regardless of that flag, but subsequently assembles and links it without presenting it externally, -S just makes it stop and dump the asm. No idea about other C compilers, but it wouldn't surprise me if they have some similar feature.
- comex 12y agoCorrect. GCC always produces assembly and shells out to as; Clang originally did the same, but now goes straight from an internal representation to machine code by default, with the old behavior as a flag. Not sure about other compilers. In addition to being wrong, the parent's point is also incredibly nitpicky.
- mastazi 12y agoYes I've been reading a bit about GCC and yes, turns out I was very wrong. I'm sorry that my comment sounded overly critical, I was actually trying to defend JS and opposing the idea that somehow "we need to fix JS". Having said that, I can see why there exists a need for "compiling" from other languages to JS - the latter being the only alternative when it comes to running code in a browser - even though personally I consider it unnecessary overhead.
- vidarh 12y agoIt is very common not just for C compilers, but for a long range of other compilers. So common that it is unclear to me which of producing textual asm output or machine code is most common. Certainly there's been periods were the attitude was that producing machine code directly was unnecessarily complex and didn't belong in the compiler.
- scrollaway 12y agoMaking a conscious decision not to use an inferior language is far from laziness. It's a productivity-oriented decision.
- timepiece 12y agoNo one is forcing you to write in js. You can write in any language you want and then compile to js. Why you have such intense and strong feeling toward a programming language? It's just a programming language after all, nothing more nothing less
- scrollaway 12y agoI have zero feeling one way or another towards javascript as I made a conscious choice not to deal with it - I write Python and Lua for a living. Just like I made a conscious choice not to deal with PHP, I care very little what happens to PHP. You're very much the one with the "strong feelings" there, accusing "intellectual laziness" for not putting real efforts in a language which is simply not worth anyone's time - not to mention assuming that people who think the language is inferior actually use it. As I said, it's a productivity decision. The opposite of laziness.
- timepiece 12y agowhich is simply not worth anyone's time If you wanna do any consumer facing web stuff, you gotta code in js in one way or another. So, if you don't do any web stuff that's fine but other people doing any serious front or back end web stuff have to master the language to get the maximum out of their work. Anyway, good luck with your darling langs
- scrollaway 12y agoI very much work on frontend as well. I just use coffeescript or dart when I need to. You seem to be missing the entire point of pretty much all the comments, and you keep making more assumptions. You're 0 for 3, yet you're still acting smug. I'd take a look into that if I were you. Take this as general advice. Edit: I saw your comment below - I'm done replying to you directly, you're probably not a troll, but it's sad that you behave like one.
- skybrian 12y agoWent through the slides and this is really great. I'd like to read more about code size and performance issues. (Things to avoid, etc.)
- spankalee 12y agoI was on the Dart team for a while, and even then I felt the best approach to the VM was for the language to become popular first, and for developers and users to demand a native VM. Dart still has a long way to go towards being mainstream, but I think this will help reduce some of the controversy surrounding it and people can focus on what it brings to developer productivity and app quality.
- myko 12y agoThis comment is taking me off the ledge on Dart a bit. I really felt doom and gloom over the announcement but this makes sense. I hope this happens. Javascript seems like a depressing future to me - even if it's only a compilation target for major shops.
- comex 12y agoTo me, "JavaScript and Dart" would also be a depressing future. You may hate JavaScript and like Dart, but there are a lot of people who hate both of them and would prefer CoffeeScript or Elm or purescript or JS+macros (sweet.js) or C# or C++ or ... IMO it is much better to focus on improving compile-to-web support with things like bytecode, better debugging, threading, custom value types, hooks into the garbage collector, etc., etc. - making it feel more like "compilation", less like "transpilation" (to the extent the term implies that you have to look at the output) - than to change the number of blessed languages from one to two. The result, if used to compile Dart (or any other language), might sacrifice a bit of performance compared to the maximum achievable by a dedicated Dart VM, but not that much, and there are myriad advantages.
- myko 12y agoReally I wish Dart VM were, like the JVM, made to be a platform to be built upon instead of a VM for a single language. But in the meantime I'd prefer Dart to JS.
- pornel 12y agoThe innovation also happens in ES6, TypeScript, and AtScript.
- munificent 12y ago> and AtScript. AtScript is dead now. The Angular folks are switching to TypeScript.
- bhouston 12y agoWell, they are merging all features of AtScript into TypeScript, which is a great idea. Less fragmentation will simplify adoption of JavaScript typing.
- bhouston 12y agoJS is getting nearly every Dart feature with ES6 and ES7 and whatever typing system makes it into the standard. There is massive JS innovation going on if you look at the future standards coming.
- msie 12y agoThey should take the bad stuff out of JS too then.
- bhouston 12y agoThey are via Strong Mode and SoundScript: https://developers.google.com/v8/experiments https://developers.google.com/v8/experiments :)
- ahoge 12y ago> JS is getting nearly every Dart feature with ES6 and ES7 With ES8 or ES9, maybe. By the way, optional named arguments with default values look atrocious in ES6. ES6: function foo({a = 1, b = 2} = {}) {…} Dart: foo({a: 1, b: 2}) {…} Dart also supports things like factory constructors, named constructors, method cascades, operator overloading, SIMD, arbitrary large integers, mixins, implicit getters/setters, implicit interfaces, enums, 'a' - 2 is a type error, [0][-1] is a range error, metadata annotations, and of course also optional types. ES7 might include SIMD and operator overloading. Another key point is that Dart's doc comment syntax is standardized. It also has an official style guide, a formatter, and a package manager. To me, these things are also very important features.
- spankalee 12y agoDart's just as important for what it removes or changes in a breaking way as for what it adds.
- tosh 12y agoDart is the innovation. Of all the developers I know that I went to university with a few years ago all with just a few exceptions have moved on from vanilla-js to compile-to-JS languages by now (Dart, Clojure, CoffeeScript, TypeScript, …) and the others are on the fence. What we need is for JavaScript to become a better compilation target and for even more language innovation. Dart is the most ambitious compile-to-JS option. Take a look at Dart's stdlib, packages and support in IntelliJ. The better dart2js gets (it is really good by now but I can't wait to see how more focus on it will take it further) the more scenarios where Dart can be used in. Just think about all the places that come with a JavaScript runtime nowadays. Just think of how the JVM allows people to write Lisp/Clojure in enterprise settings. Having a better and better dart2js story allows people to use the tools they prefer without hitting a bureaucratic wall ("compiles to js? fine.").
- frowaway001 12y ago> Dart is the innovation. > Dart is the most ambitious compile-to-JS option. Wait WHAT? Not sure if this is supposed to be irony, but if not I'd like to understand your opinion on this.
- frowaway001 12y agoDownvotes by completely delusional people are a compliment. Keep going.
- rictic 12y agoYou're being downvoted because you're adding much more heat than light to the conversation, not because your ideas are taboo. I'd recommend instead a comment like: "Consider $otheroption, it has $feature1, $feature2, and $feature3. Furthermore, it is entirely committed to $designprincipal, which provides complete safety against $classofmistake when used correctly, without any $kindofdownside." This way your reader has something to engage with other than your emotional reaction, and they may have learned something along the way.
- Someone1234 12y agoJust today I was reminded of how terrible JS is: new Date(2015, 1, 1) Guess what date that object represents (hint: It isn't January 1st 2015).
- jessaustin 12y agoIs it that you don't like zero-indexing, or that you don't like it together in the same function with one-indexing? b^) Actually I think it's pretty terrible how few languages have literal expressions for dates. Once you have to type "new Date(", it's not much more annoying to have to remember that January is zero.
- Someone1234 12y agoI have no issue with zero-indexing. It is just inconsistent. Either everything should be zero index or nothing should. In this case nothing should.
- reichstein 12y agoApropos, you can easily make your own date syntax in Dart: class Month { static const List<String> names = const <String>[ "JAN", "FEB", "MAR", "APR", "MAY", "JUN", "JUL", "AUG", "SEP", "OCT", "NOV", "DEC" ]; final int month; const Month(this.month); MonthDay operator -(int day) => new MonthDay(month, day); String toString() => names[month - 1]; } class MonthDay { final int month; final int day; MonthDay(this.month, this.day); DateTime operator -(int year) => new DateTime(year, month, day); String toString() => "${Month.names[month - 1]}-${"$day".padLeft(2, "0")}"; } const Month JAN = const Month(1); const Month FEB = const Month(2); const Month MAR = const Month(3); const Month APR = const Month(4); const Month MAY = const Month(5); const Month JUN = const Month(6); const Month JUL = const Month(7); const Month AUG = const Month(8); const Month SEP = const Month(9); const Month OCT = const Month(10); const Month NOV = const Month(11); const Month DEC = const Month(12); main() { print(MAR-25-2015); }
- 12y ago
- emodendroket 12y agoIt's not JS is the only thing in the world of computers which is around largely because it picked up enough momentum to have people try to improve on it rather than replace it.
- danabramov 12y agoAlways bet on JS. And innovation is right here: http://babeljs.io http://babeljs.io
- smrtinsert 12y agoNot true. Javascript is being forced to evolve by Dart and CoffeeScript and others who are finding a way better development experience. Where we end up is another thing altogether - to me it looks like Java and Javascript are on a path to convergence.
- deleted 12y ago[deleted]
- nicklovescode 12y agoyou wont be stuck with JS forever! I'm working on a super-productive functional language I think you'll like. Couldn't find your email. Mine is cammarata.nick@gmail.com (would rather not post link just yet)
- deleted 12y ago[deleted]