Live data from Hacker News

Dart Is Not the Language You Think It Is

programming.oreilly.com

51–60 of 143 posts

Re: Dart Is Not the Language You Think It Is

#51
post #46
post #11

Earlier quoted context omitted.

I can definitely understand the sentiment if you haven't tried it. I knew optional typing existed in AS3 (which I use for prototyping certain ideas) for a long time before finally taking the plunge and using it here and there. It lets you blast through experimental code and remain nimble until such time as you want/need to add typing. Also a nice way to avoid long chains of method overloads, including overloading met…

See, this is where the philosophy of languages like Dart and Java differs significantly from Haskell and friends. In the former, it makes sense to write code first and then try to get it to typecheck afterwards. In Haskell, this does not really happen: the types are at the very core of your code. When I write a Haskell program, I start with the types and the code grows from there. The types are really the foundation…

Yea, as always, depends on what you're doing. I agree 100% with your points for when I'm writing mission-critical code from the start. But when I'm busting out UI at 2:00AM, it's all fast and loose. A lot of code I write is somewhere in the middle.

Re: Dart Is Not the Language You Think It Is

#52
post #14

Earlier quoted context omitted.

Walled garden?? It's the most open language I know, fully OSS'ed with an extended license to include any implicit patents (removing Patent FUD), developed out in the open and accepting 3rd party contributions and inviting feedback to influence language design. Lars Bak also mentioned at Google I/O that they're in the process of trying to get it standardized, not sure what's left to do to make it any more "open" and i…

Let's not pretend that Google's open source products in any way follow an open development process. Do you notice anything in common about the recent committers? http://code.google.com/p/dart/source/list http://code.google.com/p/closure-compiler/source/list http://code.google.com/p/closure-library/source/list Their development is very much insular. That's not to say it's a poor idea to depend on these products, but t…

> Let's not pretend that Google's open source products in any way follow an open development process.

You said "product", but you should say "project".

If you want to assess the openness of the development process, look at the process itself:

https://code.google.com/p/dart/wiki/Contributing https://groups.google.com/a/dartlang.org/forum/?fromgroups#!...

If code reviews are happening in the open and there's a process to bring new contributors on board, that's a great start. This early in the game, you can't expect random members of the open source community to start contributing more than a dedicated team at Google.

> It would be nice if Google maintained mirrors on Github and accepted pull requests and such, but I don't see that ever happening.

Oh? http://github.com/google https://github.com/dart-lang

Also, FWIW on the Go project we have more than 300 non-Google contributors and a solid core of dedicated committers. https://code.google.com/p/go/source/list

Re: Dart Is Not the Language You Think It Is

#53
post #4

The language looks great. The challenge I think is always building enough of a community to create a rich enough stack that people can build real-world applications on. Scala did a fine job there, and a lot of that had to do with some companies taking some ownership of the platform (TypeSafe in that case), which may be good and/or bad. I wander what others think of this.

Your little typo "wander" instead of wonder kind of demonstrates the point of Dart. It's a language that seems to provide more of a safety net for developers. We all make trivial mistakes, probably daily. It's nice to have a little more support in a language to help us along. Throw in the extra performance (2x?) over Javascript and I'm ready to at least give it a try.

[disclaimer: I work on the Dart team]

The Dart VM is 2X faster than V8 on a few benchmarks already. Check out https://www.dartlang.org/performance We've still got a bunch of work to do, but the initial results are encouraging.

Re: Dart Is Not the Language You Think It Is

#54

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…

IDE like Eclipse

You don't need to write Dart in the Dart Editor if you don't want the IDE experience. I happily write Dart in Sublime, and Dart has command-line tools that I can use to validate the code that I write.

But web developers, who are the primary producers of JavaScript, will happily stick with Node.js, CoffeeScript, or plain JavaScript.

If web developers are happy with the tools they have, then that's just fine. The Dart team isn't trying to replace JavaScript, but instead provide another option for web development. What I think the Dart team is finding is that there are a lot of people that are having trouble with putting together all the pieces just to build a web app. This is especially true if you are new to the web platform, and you're familiar with the development from other places. Dart provides a very consistent platform that you can build web applications with, and you don't need to worry about jumping through all the hoops that normal web development requires.

By way of contrast, consider Go. Go is (in my opinion) an extremely successful successor to C, in terms of its design. It fixes a handful of problems with C (strings, and I would argue pointer arithmetic), and modernizes and streamlines it. The interface system is fantastic. In terms of its design, I have nothing but good things to say about Go.

In a way, this is how I see Dart too (though Dart is a much newer platform, not yet out of beta). Dart aims to fix a handful of problems with JavaScript (like better scoping semantics, a built-in module system, better toolability and static analysis tools, etc.), and then also takes the existing browser APIs and modernizes and streamlines them (for example, all of the core browser APIs use a consistent Future-based API for asynchronous values, which cleans up a lot of messy code that you'd ordinarily see in JavaScript web application code).

Is it any surprise that Dart has failed to take off?

It's not at 1.0 yet. I still think there is plenty of room for improvement, and plenty of time for adoption.

Re: Dart Is Not the Language You Think It Is

#55

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…

CoffeeScript, TypeScript, GWT and every other language transpiling to JS gets hit with the compilation cost to first compile to JS (possibly waiting to emit source maps as well), after that point the browser can load and execute the compiled JavaScript.

When developing and running in the DartVM, Dart code can run natively inside the Dartium browser without needing to compile to JS first. Also Dart is declaratively structured and optimized for fast start-up times (e.g. opts for lazy loading) which means they can start JIT'ing and executing from the main(){} entry point (which is also the point where snapshots are saved at).

Re: Dart Is Not the Language You Think It Is

#56

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…

Do you think the Gmail or G+ team spends all their days writing backend code? Google has some of the largest and most sophisticated web apps ever developed, e.g. the newly minted Google Maps.

All of this is courtesy of the Closure Compiler, which uses optional static typing.

Re: Dart Is Not the Language You Think It Is

#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)

Re: Dart Is Not the Language You Think It Is

#59
post #14
post #12

To me Dart looks like another brick in Google's walled garden. Weakening support for XMPP, Webkit, RSS, and JavaScript. Investment in so-called open technologies like NaCL and DART that are controlled by Google and optimized for Google's platform. Too bad.

Walled garden?? It's the most open language I know, fully OSS'ed with an extended license to include any implicit patents (removing Patent FUD), developed out in the open and accepting 3rd party contributions and inviting feedback to influence language design. Lars Bak also mentioned at Google I/O that they're in the process of trying to get it standardized, not sure what's left to do to make it any more "open" and i…

How about putting it in the care of an independent foundation like the Python Software Foundation? Until Dart is wrested from corporate control Python will still be the more open language.

Re: Dart Is Not the Language You Think It Is

#60

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…

>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 mostly about formatting and conventions, because it got very little information to work with.

Also, if you want to take care of dependencies in JavaScript, you'll need boilerplate code (several flavors exist). If you want to document your code, you'll need lengthy doc comments (several flavors exist).

Finally, with JavaScript you're always discouraged to write extensive libraries, because everything you don't use is dead weight.

With Dart, you don't have any of those problems. It scales, there is proper tooling, you can use `import` and put stuff into packages, basic documentation is already done by adding some type annotations, and unused code is also removed.

Additionally, it's a lot easier to learn than JavaScript, because the language is less quirky.

>Dart does not seem to improve on JavaScript in a compelling way. It adds optional static typing, and as far as I can tell, nothing else.

Classes/inheritance, mixins, implicit getters/setters, implicit interfaces, import, lambda expressions, proper lexical scoping, a lexically scoped `this`, operator overloading, actor-like concurrency (isolates), SIMD, faster startup, better performance, const/final, factory constructors, optional positioned/named arguments... and good tooling.

Seen that "WAT" talk? None of that.

Dart is drastically better than JavaScript.

Post reply on HN