Live data from Hacker News

Dart Is Not the Language You Think It Is

programming.oreilly.com

101–110 of 143 posts

Re: Dart Is Not the Language You Think It Is

#101

Who is the audience for Dart? Clearly it is first and foremost Google, whose programmers spend their days writing Java and C++ in an IDE like Eclipse. But web developers, who are the primary producers of JavaScript, will happily stick with Node.js, CoffeeScript, or plain JavaScript. For that audience, they are given a language with optional static typing (most don't want it) and an Eclipse-based editor (most don't wa…

Audience? I know plenty of programmers who hate JavaScript for not having classic object model. I make my living as PHP programmer and hate JavaScript too for exactly that reason. I did only jquery with plugins and inline code mostly with effects and ajax load coding.

I tried DART and did multiplayer online game http://shipsonline.org/ as my first "hello world" without any external code. Epic win for myself. It has more than static typing, please try write simple app and you will see. Eventualy it became stable and then became mainstream popular i hope.

Re: Dart Is Not the Language You Think It Is

#102
I don't know Dart but I m intrigued by this "Dart is purely object oriented". Seems that people don't like some fundamental characteristics of javascript: the functional part and the prototyped based OO style. Is it still possible to use this in Dart or it is like the author said, purely OO?

Re: Dart Is Not the Language You Think It Is

#103

Earlier quoted context omitted.

Members of the team and community have talk about such a tool, also tools that remove type annotations to prove that they don't effect performance, or remove them from local variables to match the style guide.

Wow, I wonder why I got down-voted for stating something that was simply true. I guess it's bad the people discussed the possibilities of these tools? Interesting...

Resist complaining about being downmodded. It never does any good, and it makes boring reading.

http://ycombinator.com/newsguidelines.html

Re: Dart Is Not the Language You Think It Is

#104
post #58

This I didn't get: "Dart is a source code VM The Dart VM reads and executes source code, which means there is no compile step between edit and run. As with other popular scripting languages, it’s very quick to iterate with Dart. The Dart VM runs on the command line and servers, and can be embedded into browsers. Just point the VM at Dart source code and you’re up and running!" By that definition Dartmouth BASIC is a…

@ChuckMcM The DartVM uses a method JIT which compiles the source code directly to machine code. An interpreter has a main loop which runs instructions one at a time. Wikipedia is a good place to start if you'd like to understand the difference. http://en.wikipedia.org/wiki/Just-in-time_compilation http://en.wikipedia.org/wiki/Interpreter_(computing)

I think you should probably read the links you post. They are close to claim exactly the contrary of what you say. As the Wikipedia article rightfully points, the difference is far less obvious than you make it seem.

The definition of an interpreter is generally broader than a main loop running instructions one at a time. For example, everyone seem to agree that Python is an interpreted language while python interpreter transforms the source code into an IR before passing that to its main loop. Truth is the line between what is a VM, an interpreter and a compiler is rather fuzzy.

The implementation of a process virtual machine clearly is an interpreter of a bitcode. Now, it's not entirely absurde to consider the couple JIT and VM taken together as an interpreter. Actually, this is clearly encompassed by the third point of the definition of an interpreter provided by Wikipedia : "explicitly execute stored precompiled code[1] made by a compiler which is part of the interpreter system".

To come back to the article discussion, I agree with the previous poster than the expression "source code VM" is kind of meaningless. Actually, the paragraph following is even plain wrong. The Dart VM executes bitcode not source file and Dart is JITed.

In the same way, I find it quite surprising that forty years after Hindley paper, people still confuse type annotated and statically typed but well, c'est la vie.

Re: Dart Is Not the Language You Think It Is

#105

Who is the audience for Dart? Clearly it is first and foremost Google, whose programmers spend their days writing Java and C++ in an IDE like Eclipse. But web developers, who are the primary producers of JavaScript, will happily stick with Node.js, CoffeeScript, or plain JavaScript. For that audience, they are given a language with optional static typing (most don't want it) and an Eclipse-based editor (most don't wa…

While I don't particularly like it (or Go for that matter) Dart is, if nothing else, a lot less idiosyncratic and plain crazy than JavaScript is.

Re: Dart Is Not the Language You Think It Is

#106
post #92
post #60

Earlier quoted context omitted.

>Who is the audience for Dart? AS3, C#, Java, and JavaScript developers. That's why they went with C-like syntax. It's familiar to most people. >But web developers, who are the primary producers of JavaScript, will happily stick with Node.js, CoffeeScript, or plain JavaScript. I'm writing JavaScript for a few years now. I'm really tired of it. It scales very poorly and there is zero tooling. For example, JSLint is mo…

>Seen that "WAT" talk? None of that. You realize Dart literally has broken generics? That the team thought covariant mutable collections was a good thing?

Perhaps there is a lack of appreciation of generics at Google in general. Go entirely lacks them, as another data point.

Re: Dart Is Not the Language You Think It Is

#107
post #60

Earlier quoted context omitted.

>Who is the audience for Dart? AS3, C#, Java, and JavaScript developers. That's why they went with C-like syntax. It's familiar to most people. >But web developers, who are the primary producers of JavaScript, will happily stick with Node.js, CoffeeScript, or plain JavaScript. I'm writing JavaScript for a few years now. I'm really tired of it. It scales very poorly and there is zero tooling. For example, JSLint is mo…

When I started seriously working with JavaScript, I decided to try to conform to community standards by using JSLint. I was shocked by how terrible JSLint was. It offered corrections for very straightforward constructs such as: var count = 0; for (var i = 0; i I have no idea why JSLint would tell me that I should move the definition of "i" to the top of the function (am I supposed to pretend I'm writing ANSI C for ob…

Your issue is not knowing JavaScript. No point to blame a JavaScript linter.

Re: Dart Is Not the Language You Think It Is

#108
post #18
post #16

Earlier quoted context omitted.

As long as you're adding a type system (optional or not) it does seem a bit odd to opt for an unsound one...

makes sense if you prefer dynamic languages since it adds least friction.

You can always have the Any type + a runtime tag on the box if you really need it.

Re: Dart Is Not the Language You Think It Is

#109
post #92

Earlier quoted context omitted.

>Seen that "WAT" talk? None of that. You realize Dart literally has broken generics? That the team thought covariant mutable collections was a good thing?

Perhaps there is a lack of appreciation of generics at Google in general. Go entirely lacks them, as another data point.

Yes, but I think it's a more wide-spread issue. Comparing languages of the European school with languages of the Anglo-Saxon school, it seems like the wide-spread anti-intellectualism in the US has a large impact on language design quality.

I remember that Dijkstra had some pretty good article about it.

Re: Dart Is Not the Language You Think It Is

#110

Earlier quoted context omitted.

Dart compiles to JavaScript, much like CoffeeScript, Microsoft's TypeScript, Haxe and many others, and they still make the fastest JavaScript VM on the planet.

Yes and no, An important caveat that Dart as JavaScript runs in it's own isolate and communicates with existing JavaScript libs through ports. This js-interop code is nearly 500k unminified. And you won't be able to minify all your JS (dartJs + other js) into one lib, because dart js doesn't play well with standard tools. One can certainly interop with js libs, but it's not pretty. Dart is not near 1.0 yet, so there…

On the opposite side , with a little bit of "header" writing ( or none but you lose type safety ) , Haxe support direct use of javascript libraries , that's what makes Haxe better than dart in my opinion, and you can reuse all the code that is not tied to the DOM is C++,Neko,Java and Flash apps (and android + iphone + ... with the NME framework ). But Dart optional type system is still interesting.
Post reply on HN