Live data from Hacker News

Dart Is Not the Language You Think It Is

programming.oreilly.com

21–30 of 143 posts

Re: Dart Is Not the Language You Think It Is

#21

I like what I see in the article, but... I'm kinda put off by the seemingly high barrier of entry. All the tools they show off are great once you've started, but I don't want to install all that just to try a slightly more advanced "hello world" sample. It's really too bad there isn't an equivalent of play.golang.org for Dart. I would've given it a try right now if the barrier of entry were lower, and perhaps I'd be…

> It's really too bad there isn't an equivalent of play.golang.org for Dart.

There is.

http://try.dartlang.org

Anyhow, the barrier is actually pretty low. The editor zip is about 140MB in size and contains everything you need: the SDK, the editor, and Dartium (Chromium + Dart VM).

Re: Dart Is Not the Language You Think It Is

#24
post #5

Untyped languages are okay. Typed languages are also okay. Typed languages with inference are okay. Optionally typed is extremely strange.

I think it's rather natural. Look at Haskell. Static typing with type inference was recently extended to allow "holes" in the type system. It lets you run broken programs, and let's be honest, my programs are broken (in some sense) most of the time. C++ lets you use the "auto" keyword in many places. Maybe the only thing strange here is that Dart has more of the "dynamic by default" mentality, but that's not strange…

Optionally specifying types which are otherwise inferred is not the same as optional typing. Haskell expressions always have a type. Often the compiler is smart enough to figure out what it is without you explicitly telling it, but it still has a type. Haskell typed holes still doesn't allow you to escape from the type system, it's more a way of saying "Here I am in the middle of an expression and I'm lost, could you tell me what fits here in your opinion Mr. Compiler?" It still has a type, it is not a way that you can just feed the compiler type-gibberish and move on.

In Dart, the types appear to be little more than advisory documentation.

I don't know Lisp; what happens to your add3 if you pass a thing that can't be added to 3? Does it crash at some sort of 'type checking phase' (whenever that may be) or only when it finally discovers it can't do the addition, essentially ignoring the type declaration? (Or both and neither, depending on what exact Lisp and macro set you're using, which is my guess.)

Re: Dart Is Not the Language You Think It Is

#27
post #5

Untyped languages are okay. Typed languages are also okay. Typed languages with inference are okay. Optionally typed is extremely strange.

> Optionally typed is extremely strange.

It's like the kind of JSDoc annotations you need for the Closure Compiler.

The difference is that it's baked into the language, which enables a very terse syntax and, since it's standardized, it can be used by all of your tools.

You only need those annotations at the API boundaries (arguments and return values) to get most of the tooling benefits like call-tips, auto-complete, direct & inferred static checks, runtime checks, generated documentation, and things like that.

Re: Dart Is Not the Language You Think It Is

#28
post #13
post #5

Untyped languages are okay. Typed languages are also okay. Typed languages with inference are okay. Optionally typed is extremely strange.

Dart's optional typing is effectively a dynamic language that allows you to decorate your source with optional Type info that effectively just acts like documentation for other developers and automated tooling. It's far more readable and concise having it embedded in the language rather than buried and disjointed in the comments. Not to mention it also allows for superior tooling support. I've personally been extreme…

Do you just use Dart on the client side, or also do server side using Dart? I have been using Clojurescript and Clojure for client and server coding, but I might be interested in trying another "one language" stack.

Re: Dart Is Not the Language You Think It Is

#29
I really like the feature set and feel of Dart. My only concern is lack of browser support.

As of May 2013, Microsoft Internet Explorer, Mozilla Firefox, Opera Software's Opera browser, and Apple Safari have no plan to embed a separate Dart VM [1].

What would it take to get these vendors to add support?

1: http://en.wikipedia.org/wiki/Dart_%28programming_language%29...

Re: Dart Is Not the Language You Think It Is

#30
post #22

[deleted]

Is that jealousy, I hear ;-) ?

Well Dart is fun. It is fun in its own niche. It is like Java for the web. Can have types. The IDE is a central point of development. Easy to get started for those who are perhaps average in their skill. Is designed to be familiar (curly brackets and simple syntax).

It is not fun in the sense that Haskell, Erlang or LISP are fun. Oh look monadic isomorphic catamorphims with actor based concurrent meta-interpreters kind of stuff. So both fun but in different ways.

Let's see how the shout example is fun in more detail. It shows the usage of a library. This is not a require.js hack, but a nicely built in facility. Also don't have to put everything in a class like in Java. The example also shows the usage of an anonymous function syntax. Those are fun and good for short callbacks. Not fun is in academically interesting but fun for practical use. It took Java decades to acquire those.

Post reply on HN