Beta
×

Welcome to the Slashdot Beta site -- learn more here. Use the link in the footer or click here to return to the Classic version of Slashdot.

Thank you!

Before you choose to head back to the Classic look of the site, we'd appreciate it if you share your thoughts on the Beta; your feedback is what drives our ongoing development.

Beta is different and we value you taking the time to try it out. Please take a look at the changes we've made in Beta and  learn more about it. Thanks for reading, and for making the site better!

Dart Is Not the Language You Think It Is

Soulskill posted about a year and a half ago | from the it's-actually-cobol-in-a-funny-hat dept.

Programming 312

An anonymous reader writes "Seth Ladd has an excellent write-up of Dart: 'When Dart was originally launched, many developers mistook it for some sort of Java clone. In truth, Dart is inspired by a range of languages such as Smalltalk, Strongtalk, Erlang, C#, and JavaScript. Get past the semicolons and curly braces, and you'll see a terse language without ceremony. ... Dart understands that sometimes you just don’t feel like appeasing a ceremonial type checker. Dart’s inclusion of an optional type system means you can use type annotations when you want, or use dynamic when that’s easier. For example, you can explore a new idea without having to first think about type hierarchies. Just experiment and use var for your types. Once the idea is tested and you’re comfortable with the design, you can add type annotations."

Sorry! There are no comments related to the filter you selected.

There are two kinds of programming languages.... (5, Interesting)

Anonymous Coward | about a year and a half ago | (#43788737)

Those people always bitch about and those no one uses.

Since I have yet to hear any complaints about Dart, I can only assume it's in the latter category and no one cares.

Re:There are two kinds of programming languages... (4, Insightful)

stormboy (1691754) | about a year and a half ago | (#43788923)

Get ready to hear some bitching about Dart on this thread, then review your assumption.

The proliferation of computer languages (4, Insightful)

Taco Cowboy (5327) | about a year and a half ago | (#43789043)

I haven't used DART yet, so I will not comment on the strength or the weakness of it

But, all through the decades that I've been in the scene, there have been so many programming languages invented, but so few of them being used

Some of the more widely used programming languages like C, for instance, are not perfect, but they are being used partly because of legacy, partly because of momentum, and partly because of the laziness of programmers to learn new, more useful languages

Talking about legacy, the other day there was a piece on Cobol, and that IBM is trying to extend Cobol to the cloudsphere

As for the languages that are not so-widely used, some of them are downright weird, but then, there are gems among them. The only downside for those few gems is that the ecology is not there to enable those few gems to become more widespread

I guess it's kinda Darwinian game plan --- not all surviving/thriving species are perfect, and not all the extinct species are bad, either

Re:The proliferation of computer languages (0)

Anonymous Coward | about a year and a half ago | (#43789305)

laziness of programmers to learn new, more useful languages

What can't you do in C? I know that if it can't do something easily, you can create a library in it so that you can do it easily. Even create interpreters to make more useful languages. How's that again?

Re:The proliferation of computer languages (0)

Anonymous Coward | about a year and a half ago | (#43789459)

What can't you do in C?

Use functional duck-typed garbage collection monads, of course. You are you supposed to build a RESTful API for your grocery list webapp without them?

Re:The proliferation of computer languages (1)

Joce640k (829181) | about a year and a half ago | (#43789655)

What can't you do in C? I know that if it can't do something easily, you can create a library in it so that you can do it easily.

Throw an exception? Stack unwinding? RAII? Object construction/destruction?

I'd like to see a library that does all those easily/automatically.

A C++ compiler OTOH...now you're talking!

Re:The proliferation of computer languages (3, Informative)

angel'o'sphere (80593) | about a year and a half ago | (#43789689)

C++ implements all this with C features called setjmp and longjmp.

http://en.wikipedia.org/wiki/Setjmp.h [wikipedia.org]

Re:The proliferation of computer languages (0)

Anonymous Coward | about a year and a half ago | (#43789831)

Not looked at setjmp and longjmp for a long time, but I don't think those do stack unwinding.

Re:The proliferation of computer languages (4, Informative)

Pseudonym (62607) | about a year and a half ago | (#43789847)

setjmp and longjmp do many useful things, but stack unwinding is not one of them, and it's far from "easily and automatically". If you're trying to do the same thing as a real exception system, setjmp/longjmp imposes a large maintenance overhead (and significant run-time overhead, but the maintenance overhead is arguably much more important) on your program, even if you never raise an exception.

Incidentally, I do have a few quibbles with the list you responded to. C programmers do object creation and destruction just fine, it's only exception raising and stack unwinding which requires the manual effort. And RAII is a means, not an end in itself.

Re:The proliferation of computer languages (1)

mevets (322601) | about a year and a half ago | (#43790047)

You only have to unwind the stack frames that matter, and merely keep a chain of what needs to be destroyed.
It is not cheap, but C++ exception handling is not cheap either.
It is also a poor way to implement things, but at least you will be remembered.
C++ amortizes overhead more evenly than C, so inefficiencies of a particular mechanism are not as glaring. Would you take the roof racks off an SUV to save gas?

Re:The proliferation of computer languages (1)

siride (974284) | about a year and a half ago | (#43789703)

setjmp()/longjmp() were good enough for my dad and daggone it, they're good enough for me!

Re:The proliferation of computer languages (0)

Anonymous Coward | about a year and a half ago | (#43789871)

Vala. Compiles all those things to C, then you compile the C. And it's also very clean C, not the clusterfuck that GObject/GLib is - except for the portions that use GLib of course.

Re:The proliferation of computer languages (2)

Pseudonym (62607) | about a year and a half ago | (#43789795)

What can't you do in C?

Write a robust system that has a sufficiently complex job to do, on time and on budget.

In particular, if you find yourself having to write an interpreter first, you probably should have used another language. (Unless, of course, the interpreter is the job.)

Re:There are two kinds of programming languages... (5, Insightful)

Anonymous Coward | about a year and a half ago | (#43788955)

I vote for no one cares.

I for one never encountered a situation where I thought "gee, if only I could prototype without types!". Types matter. When solving even the most basic data processing problem there's "input" and "output". Specifications are very clear on the formatting and types. What happens in between is dictated by those types.

Typeless programming in shorthand for lazy markup.

Re:There are two kinds of programming languages... (2)

dreamchaser (49529) | about a year and a half ago | (#43789625)

I'm not sure why you were modded Troll. I tend to agree. Types are no good if they are not enforced. Either use a language that doesn't enforce typing or use one that does. This in between approach is indeed lazy.

Re:There are two kinds of programming languages... (4, Insightful)

Pseudonym (62607) | about a year and a half ago | (#43789875)

Yeah, exactly. What the writeup calls "appeasing a ceremonial type checker" is more properly called "debugging".

Don't get me wrong, I like the thrill of the chase, the satisfaction of tracking down a really hard bug, as much as anyone. But I like programming even more. Using a well-designed type checker, I can find bugs in my program and convince myself that I'm programming rather than debugging.

Re:There are two kinds of programming languages... (0)

Anonymous Coward | about a year and a half ago | (#43789233)

They are like Pop tunes. All vaguely the same but different. Empty and useless. Without purpose other than to be Yet Another Language.

Re:There are two kinds of programming languages... (0)

Anonymous Coward | about a year and a half ago | (#43789257)

And then there's Python.

Sounds like (0)

Anonymous Coward | about a year and a half ago | (#43788777)

the D

Re:Sounds like (0)

Anonymous Coward | about a year and a half ago | (#43789095)

How tenacious.

Unadvantages! (5, Interesting)

Shaiku (1045292) | about a year and a half ago | (#43788809)

Once the idea is tested and youâ(TM)re comfortable with the design, you can add type annotations.

I've been doing this with comments since 1999 and it works great! Of course I still haven't gotten around to that final step of going back and adding all those comments but I love the flexibility!

Unless you like bugs, type-checking is a good thing. Lack of type enforcement encourages what -- lack of forethought?

Re:Unadvantages! (0)

Anonymous Coward | about a year and a half ago | (#43788893)

I get the same feeling, sounds good for just testing something quickly, but anytime it gets bigger it will turn into an ugly mess.

Re:Unadvantages! (1)

H0p313ss (811249) | about a year and a half ago | (#43788989)

Once the idea is tested and youâ(TM)re comfortable with the design, you can add type annotations.

I've been doing this with comments since 1999 and it works great! Of course I still haven't gotten around to that final step of going back and adding all those comments but I love the flexibility!

Unless you like bugs, type-checking is a good thing. Lack of type enforcement encourages what -- lack of forethought?

Exactly, this is one of the things that crippled large smalltalk projects back in the day; it was almost impossible to figure out how to call someone elses code without invoking the wrath of doesNotUnderstand.

Re:Unadvantages! (5, Interesting)

dreadway (459923) | about a year and a half ago | (#43790107)

IMO the thing which crippled large Smalltalk projects was the corporate IT market embracing programming technologies which looked more like C. You had to fight hard to make Smalltalk code look like a procedural language, which a larger body of programmers were already used to. Java, C++, and C# look more like C, so I guess they have that going for them.

Smalltalk is a strongly-typed, late-binding language. Smalltalk's Object>>#doesNotUnderstand behavior is a hindrance for production-quality code only to the extent that your programmers are unwilling or unable to read and use someone else's API. Oh, and maybe your system design should not suck, no matter what programming technology is involved.

I worked for years as a Smalltalk programmer on big, corporate IT systems involving hundreds of programmers and handling hundreds of millions of $$$ per day in production, but corporate IT has had a mood swing and now our systems mostly use the early-binding programming technologies. I like being gainfully employed, but am not persuaded the tradeoffs of the extra code, convoluted syntax constructions, and tool paradigms actually represent any improvements. And finally, believe it or not, but the less senior programmers apparently have difficulty reading and understanding the code (even with its early-binding features) written by far more experienced programmers than myself, which in turn results in numerous and varied production defects. Who would have thunk it, eh?

Re:Unadvantages! (1)

Nerdfest (867930) | about a year and a half ago | (#43789003)

It lets you throw something together quickly for a proof of concept. After you throw in the type annotations the compiler, lets you know how sloppy you are and why you should use static typing. (YMMV, but generally not in a system of any serious complexity)

Re:Unadvantages! (5, Insightful)

farble1670 (803356) | about a year and a half ago | (#43789163)

It lets you throw something together quickly for a proof of concept

the thing about type safety ... even if you use a non-type safe language, you still have to get it right or your crap will crash, or worse, run and do something unexpected. you still need to be type safe, it's just that you have to find all your bugs at runtime in stead of compile time. do we need to discuss why it's better to catch bugs at compile time?

Re:Unadvantages! (1)

angel'o'sphere (80593) | about a year and a half ago | (#43789765)

How many not type safe languages do you know?

Re:Unadvantages! (1)

Nerdfest (867930) | about a year and a half ago | (#43789945)

That's exactly what the latter part of my post was saying, although my sense of humour is apparently lacking. I have seen some nice work done in dynamically typed languages, but in general you need to unit test the living crap out of it (which you really should do anyway), and you can generally do the same thing with interfaces if you design well (single responsibility principle & interface segregation).

Re:Unadvantages! (3, Insightful)

Longjmp (632577) | about a year and a half ago | (#43789371)

Unless you like bugs, type-checking is a good thing. Lack of type enforcement encourages what -- lack of forethought?

My thoughts exactly. Any language that makes you believe you can leave the "thinking" to the compiler is the wrong approach.
Might as well program the next Mars rover in PHP.

(not that PHP is bad as such, it just makes lazy programmers more lazy)

Re:Unadvantages! (2)

lennier (44736) | about a year and a half ago | (#43789731)

Might as well program the next Mars rover in PHP.

Now that's just silly. Of course something mission-critical like a space probe won't be running PHP.

It'll be running jQuery on node.js.

what do you mean the latency from our data center on Pluto is lousy? look at the cost savings we get from the free cooling!

Re:Unadvantages! (1)

angel'o'sphere (80593) | about a year and a half ago | (#43789749)

Well, fact is some people can live without type checking.

Some can't. (I'm more the second variant)

However analyzing the problem comes down to the point that I'm either a bad typer or a bad reader or both. Words like print, prnt, pirnt, even pront, prant, pfrint etc. look at the first glance the same for me. Ofc they all mean

print. However in a language like Smaltalk, Groovy or Python a statement like:
    a.pront("hey!")
will compile.
It will run even (to a certain point).
However, the problem above is not a "type problem". The runtime system knows that the method "pront" is not defined and will raise an error. The language etc. is still type save. Unlike the bad things you can do in C or C++ (like casting const away on a reference on the stack ... the thing I like most about programming is "casting". (Angel O'Sphere casts "fire ball" at the dragon. The dragon evaporats into smitheren! Muhuhuhaaaaa!)
Well, other people don't have my problem. they see a word as a word like a word and if the word seems odd they see their typo. Hence: they have no problme in programming in Lisp, Python or Groovy or Smalltalk.
Your idea about how types/typecheking work is a little bit wrong ...

Since I think nothing of Dart (5, Funny)

Spy Handler (822350) | about a year and a half ago | (#43788811)

not having heard of it, and thus never having any thoughts about it, and since you say it's NOT what I think it is (nothing), I guess Dart *is* something!

Re:Since I think nothing of Dart (0)

Anonymous Coward | about a year and a half ago | (#43788943)

Never heard of it either. Google Evangelist evangelizing.

Welcome to the chopping block (0)

Anonymous Coward | about a year and a half ago | (#43788855)

It sounds like somebody's language is on the chopping block at google. Dart has had a long, quiet run and Google seems to be allergic to that these days.

Re:Welcome to the chopping block (2)

larry bagina (561269) | about a year and a half ago | (#43789019)

Being killed off is better than the alternative -- forced integration with google+. Will they require you to login to google+ to run the javascript transpiler? Will they auto-post your error log to your google+ page? Will they remove the "+" operator (like they did with search)? Who knows!

So, like Lisp (0)

Jmc23 (2353706) | about a year and a half ago | (#43788879)

but more restrictions and unnecessary syntax. Great.

Can't wait' for the day when all languages 'evolve' back to Lisp.

Re:So, like Lisp (2)

Aguazul2 (2591049) | about a year and a half ago | (#43788915)

No, nothing like Lisp.

Re:So, like Lisp (2)

kwerle (39371) | about a year and a half ago | (#43788985)

Turing complete?

Re:So, like Lisp (3, Insightful)

ebno-10db (1459097) | about a year and a half ago | (#43789075)

more restrictions and unnecessary syntax

I like syntax. It helps human beings read code. It was never intended for anything else.

BTW, what language is going to evolve back to Lisp and be usable for writing OS kernels, drivers and other such primitives?

Re:So, like Lisp (2)

ChunderDownunder (709234) | about a year and a half ago | (#43789201)

I was going to say BitC but that language evolved away from s-expressions to something more Haskelly.

Re:So, like Lisp (1)

Jmc23 (2353706) | about a year and a half ago | (#43789701)

umm, lisp? It's really good at twiddling bits.

As for readability, pretty much any non-programmer would disagree with you, and lots of programmers as well! I think it was never for readability but for those with lesser minds who can't hold too much information in their head and for those who write functions hundreds of lines long.

Re:So, like Lisp (1)

ebno-10db (1459097) | about a year and a half ago | (#43790117)

lisp? It's really good at twiddling bits

How fast? What support environment is required? What happens when the GC kicks in?

As for readability, pretty much any non-programmer would disagree with you

Non-programmers would look at either and say "gibberish".

and lots of programmers as well!

The only programmers I've ever met who disagreed were Lisp programmers.

I think it was never for readability but for those with lesser minds who can't hold too much information in their head and for those who write functions hundreds of lines long.

Complaining about people who can't hold too much information in their heads and then those who write functions hundreds of lines long is a curious contradiction.

I don't know whether you're playing or really are one of those Lisp evangelists with a funny look in their eyes (probably from looking at too many parentheses). Either way, have a good night. Maybe I'll go back to making Lisp jokes in the morning. In the meantime rms@gnu.org may be holding an evangelists meeting.

Re:So, like Lisp (1)

Waffle Iron (339739) | about a year and a half ago | (#43789251)

but more restrictions and unnecessary syntax

(so (that (can (understand (non dweebs) (your program)))) (is (necessary syntax)))

Re:So, like Lisp (1)

ebno-10db (1459097) | about a year and a half ago | (#43789273)

I use to write Lisp, but I wore out the parentheses keys.

Re:So, like Lisp (0)

Anonymous Coward | about a year and a half ago | (#43789401)

My zero and nine keys went mysteriously missing a few days after I picked up Lisp. Then I switched editors and ctrl, shift, and alt tabs vanished. Later I realized I'd just worn off the symbols on the keys, and was speaking in a thrange way.

Re:So, like Lisp (1)

ebno-10db (1459097) | about a year and a half ago | (#43789509)

I switched editors and ctrl, shift, and alt tabs vanished. Later I realized I'd just worn off the symbols on the keys

As a long time user, I can tell you that a real Emacs man can find those keys in the dark.

Re:So, like Lisp (3, Funny)

angel'o'sphere (80593) | about a year and a half ago | (#43789907)

I can confirm that. The keys are still where they ment to be. However if you use Emacs you are likely assuming that this is a nice editor. Well, as far as I can tell it is a nice operating system, but it lacks a decent editor. Honestly you should give vi or vim a try.
No offense, only a full hearted wish for your future!

Re:So, like Lisp (1)

ebno-10db (1459097) | about a year and a half ago | (#43790133)

you should give vi or vim a try

A curse on you and a whole bunch of stuff associated with you (whatever makes this more insulting). They say language wars are vicious, but editor wars are worse! With a little effort we can make the Wars of the Reformation look tame.

Re:So, like Lisp (1)

Jmc23 (2353706) | about a year and a half ago | (#43789673)

That looks like a stupid person trying to make a joke, not anything like Lisp.

Re:So, like Lisp (1)

Waffle Iron (339739) | about a year and a half ago | (#43789853)

It's perfectly valid Lisp code. So it looks exactly like Lisp.

Re:So, like Lisp (0)

Anonymous Coward | about a year and a half ago | (#43789995)

Your sig: Don't complain about syntax, grammar, or spelling. There is no.hell like input on android.

Get SwiftKey 3. Not perfect but far from hell, and it learns as you use it.

Understanding Dart's goals (4, Informative)

Necroman (61604) | about a year and a half ago | (#43788901)

I've been following Dart on and off since it's announcement. I'm still a little skeptical of the language, but I'm a fan of what they want to do. Here are their basic goals:

  • Create a class based (OOP) language for doing browser heavy apps (like GMail).
  • Allow it to inter-op with today's browsers (hence compiling to Javascript)
  • Create a DartVM so the code can run faster than there javascript counter-parts. This also allows for server-side, but this much lower on their priorities.
  • Make the language easy for Java/C++/C# developers to learn.
  • Only work with "the modern web". meaning IE9 and higher.

There is a lot more to it than this, but it's sort of a beginning. The language still hasn't hit 1.0, so no one is seriously using it (as the language itself was seeing large changes up until recently). Google has not talked about anyone outside of the Dart team itself that is using Dart within Google (they are doing it, it's just not being talked about yet).

Since 1.0 is expected this summer, you probably won't see many people using it until that milestone is hit. Once 1.0 is hit, people will be more willing to create real products with it, so you can expect to see more about Dart after that. As well, once the DartVM makes its way into Chrome (which will happen sometime after 1.0), you'll probably see a lot of press about the first Google App that is written in Dart.

It's still early in Dart's life. The only people really seriously using it are people that like learning new languages. Companies and most developers won't touch an in-progress programming language out of fear that syntax and behavior changes will screw them up.

Re:Understanding Dart's goals (1)

fisted (2295862) | about a year and a half ago | (#43789023)

If modern web means IE9 or higher, then thanks, but no, thanks.

Re:Understanding Dart's goals (1)

siride (974284) | about a year and a half ago | (#43789763)

I think that's IE9, IE10, Chrome, Safari, Firefox.

Re:Understanding Dart's goals (1)

Nerdfest (867930) | about a year and a half ago | (#43789049)

"Not JavaScript" is a pretty bug feature if you like having maintainable code. JavaScript is a very flexible language and all, but there are *way* too many bad/flaky things about it. I'm hoping it's an open language (more open than Java at least), but I'm assuming it is as it's from Google. It would be nice to have a single language that could replace Java and JavaScript, and a handful of other languages.

Re:Understanding Dart's goals (0)

Anonymous Coward | about a year and a half ago | (#43789129)

That's flatly untrue for modern Javascript. The problem is that the only people who care to implement Harmony/Ecmascript 6 right now are.. Mozilla. Google would rather SAY they're doing it, and instead focus their efforts on their own spin-off of ES6 named.. Dart. MS is also lagging badly. It makes JS look bad just so alternatives can be marketed that will ultimately fail to get any traction.

That's the real shame here. Google has a massive problem with not-invented-here that leads them to develop their own tech. When Mozilla asked them to add APNG support to Chrome, they basically said "nope, NIH." Jpeg2000? Nope. JpegXR? Nyet. We're going to replace ALL image formats with our own monolithic, moving-target of a format called WebP!

Same goes with Dart. Google's got a lot of great minds, but when it comes to making choices for the broader web, they're always right and everyone else's solutions are ignored until Google makes their own more exciting version-twos of them.

Re:Understanding Dart's goals (2)

Kal Zekdor (826142) | about a year and a half ago | (#43789347)

I actually have taken a liking to TypeScript [typescriptlang.org] for that purpose. It is rather fancy. I never touch "raw" js any more, I just treat it as a compiled blackbox.

Re:Understanding Dart's goals (1)

larry bagina (561269) | about a year and a half ago | (#43789785)

The Dart source code is BSD licensed, available on Google Code (hmm... I wonder when Google Code will get shut down...)

One of the contention points in the WebKit/Blink split was support for non-JS languages. Chrome (and Opera, Google's bitch) will, I suppose, support it, but Firefox, Safari and IE? Then again, IE used to support VBScript and PerlScript back in the day, so maybe Google could do an IE/Dart plugin.

Re:Understanding Dart's goals (1)

angel'o'sphere (80593) | about a year and a half ago | (#43789851)

Well,

don't get me wrong. However knowing what a class is and knowing what a function is and knowing what a procedure is and knowing what a script is ans knowing what a program is .... it hurts me (physically!!) that a class in JavaScript is defined/introduced with the keyword "function". Sorry, a function is not a class. That is computer science first year. The guy who invented that should be shot. (Interesting however is that there are likely more Javascript developers on the world than Java or C# or C++ developers, and they seem to have no problem with this)

Re:Understanding Dart's goals (1)

atchijov (527688) | about a year and a half ago | (#43789403)

if I remember correctly, Dart was announced end of 2011 and become available to "play with" almost immediately. Since couple month after announcement, I have not seen anyone mentioning it ever. In 'internet years', 2011 is ancient history - so I am not sure if "it's still early in Dart's life" apply. I can see Google pushing it into Chrome, but I can not see Google replacing JS with it and I do not see any other browser except Chrome adopting it. Dart solves problem which no one has.

So Which is Faster? (0)

LifesABeach (234436) | about a year and a half ago | (#43788903)

GWT, or DART?

Re:So Which is Faster? (1)

viperidaenz (2515578) | about a year and a half ago | (#43789165)

They're two different things to solve the same problem.
One is a framework with a limited java->javascript compiler, one is a language.

ps: problem = Javascript's prototype based objects are not tool-friendly, hence no decent Javascript IDE's.
Google has decided its easier to use a different language and compile it to Javascript than to write good IDE support for Javascript.
Java is perfect for building tools for it - hence GWT uses a subset of Java (reflection is one missing part). Dart is designed to be cross compiled and be easy to write tools for.

Re:So Which is Faster? (1)

MetalOne (564360) | about a year and a half ago | (#43789287)

There is also AngularJS. The third thing to solve the same problem.

Such subtlety (-1)

Anonymous Coward | about a year and a half ago | (#43788919)

Really, guys, a slashvertisement for a failed Google programming language?

Worthy of a Microsoft Gartner award.

Yet Another Language -- what good is it? (4, Interesting)

l0ungeb0y (442022) | about a year and a half ago | (#43788979)

Or so that was my first thought. Then I got to the end of the article

Dart compiles to JavaScript and runs across the modern web

And suddenly I find it potentially very useful. I have a NodeJS project to develop a Streaming Service later this week. While I was planning on writing it in Coffeescript, the classic OO nature of Dart with Type Checking and Interfaces(!) seems like a potentially better match since the NodeJS app will be a clustered streaming service -- just the sort of application whose architecture could greatly benefit from these language features. If that succeeds, I know of a large retailer wanting to create a NodeJS middleware as a REST API to legacy systems, who might find Dart as compelling as I do.

Wish it had better JS interop (3, Insightful)

kwerle (39371) | about a year and a half ago | (#43788991)

I fooled around with Dart a few months ago. I like the language. But I really want to be able to use it AND all the javascript libraries that do lots of work for me. It's my opinion that it will be hard for Dart to get traction if all those libraries have to be rewritten.

Re:Wish it had better JS interop (1)

Kielistic (1273232) | about a year and a half ago | (#43789791)

You're in luck. Dart can access javascript without too much trouble.

Type Checker (2)

mdmkolbe (944892) | about a year and a half ago | (#43788993)

Dart understands that sometimes you just don’t feel like appeasing a ceremonial type checker.

Given that in Dard, the type checker is only ceremonial as far as I can tell, this is an interesting choice of words. The purpose of a true type checker like you find in Haskell, Agda, ML, ATS, etc. isn't just ceremonial. It guarentees certain properties of the resulting program (e.g., that variables of a certain type actually contain an object of that type, that you can never apply an invalid operation to an object, etc.). That is far from ceremonial.

Re:Type Checker (0)

Anonymous Coward | about a year and a half ago | (#43789771)

Provable correctness is for un-agile dweebs. You want to review your code? Psssh. Just ship it! bugs@disruptinnovation.io is our code review!

Big fat waste of effort. (1)

Anonymous Coward | about a year and a half ago | (#43788997)

Why they recreated Ecmascript 6 is beyond me. Seems a huge waste of effort when they could have focused on implemented Harmony more quickly in Chrome/Blink/Webkit, and evangelizing that instead.

YASL (1, Insightful)

ebno-10db (1459097) | about a year and a half ago | (#43789001)

Yet another scripting language. Oh boy, because Perl, Python, Ruby, Lua, and probably a hundred others I've never heard of just don't give you enough chaos (oops, I mean choice). Or there is some reason that Dart is the scripting language to end all scripting languages. Or it's an optimal combination of the best features of 47 other languages. Whatever.

Just experiment and use var for your types.... (2)

randomErr (172078) | about a year and a half ago | (#43789009)

Isn't that just Visual Basic 6, VBScript, JScript, ActionScript, Real Basic, Jabaco, or JavaScript/ECMAScript? There are languages out there and even C# has the dreaded 'var' in it as well. I just don't see Dart's use outside of Google products.

Re:Just experiment and use var for your types.... (2)

ebno-10db (1459097) | about a year and a half ago | (#43789101)

I just don't see Dart's use outside of Google products.

So? It's Google! By definition everything they do is wonderful, brilliant and the future. But their greatest product of all is hype, and they ship it in volume.

Re:Just experiment and use var for your types.... (1)

Tablizer (95088) | about a year and a half ago | (#43789215)

So? It's Google! By definition everything they do is wonderful, brilliant and the future. But their greatest product of all is hype, and they ship it in volume.

Microsoft is suing for Prior Art

Re:Just experiment and use var for your types.... (1)

siride (974284) | about a year and a half ago | (#43789805)

C#'s var has nothing to do with JavaScript's var.

Re:Just experiment and use var for your types.... (1)

AlphaBro (2809233) | about a year and a half ago | (#43789827)

In C#, var is used to declare implicitly typed variables. They're still strongly typed.

Re:Just experiment and use var for your types.... (0)

Anonymous Coward | about a year and a half ago | (#43789895)

Isn't that just Visual Basic 6, VBScript, JScript, ActionScript, Real Basic, Jabaco, or JavaScript/ECMAScript? There are languages out there and even C# has the dreaded 'var' in it as well. I just don't see Dart's use outside of Google products.

I don't believe 'var' in C# is what you think it is.
'dynamic' or 'object' is probably what you meant.

I believe C#'s 'var' is closer to C++11's 'auto' than to JavaScript's 'var'

The new COBOL (0)

Anonymous Coward | about a year and a half ago | (#43789011)

Apparently the real reason to include Big Integers was to make it an attractive language for dollars and cents... for instance this commit came from financeCoding/master [github.com] .

Exciting stuff...

Lol what? (1)

Anonymous Coward | about a year and a half ago | (#43789027)

"Just experiment and use var for your types. Once the idea is tested and you’re comfortable with the design, you can add type annotations." Riiiight, because all developers you know do that. It's never about "just do something that works and then move onto something else"... Nope, doing things properly always happens. And it especially happens on the projects that matter.

ActionScript + Python + Ruby (2)

RedHackTea (2779623) | about a year and a half ago | (#43789249)

That's what I think. ActionScript allows the same static/dynamic switch:

for(var i:int = 0; i < 0; ++i) { }
for(var i = 0; i < 0; ++i) { }

But, in strict mode, it will give you warnings for the 2nd.

Re:ActionScript + Python + Ruby (1)

Longjmp (632577) | about a year and a half ago | (#43789513)

Actually, a compiler would give you the same results for both concerning "for( i = 0; i < 0;)"

In Assembler: NOOP ;)

Re:ActionScript + Python + Ruby (1)

Mashdar (876825) | about a year and a half ago | (#43789811)

Thank you for incrementing before the return in your for loop!

Dart has some important fans (1)

93 Escort Wagon (326346) | about a year and a half ago | (#43789265)

I know Tom Magliozzi used to wax rhapsodical about his old Dodge Dart from the 1960s; and recently Dodge resurrected the brand [cartalk.com] .

So yeah - there are people that care deeply about Dart.

Re:Dart has some important fans (1)

ebno-10db (1459097) | about a year and a half ago | (#43789373)

I think the car was named after the Delta Dart [wikipedia.org] , which is way cooler than any car or programming language.

Re:Dart has some important fans (1)

larry bagina (561269) | about a year and a half ago | (#43789835)

It's actually Google Fart. Another casualty of autocorrect.

Dart feels your pain (1)

Anonymous Coward | about a year and a half ago | (#43789363)

Dart knows that you don't have time for strict typing. Unless you do. For example, Dart allows you to write code. And that's just one example. Once your code is done, you can add more code that doesn't do anything. Unlike other languages, Dart allows you to define functions and libraries, not just classes. Go ahead, write free functions and import them into your programs. See if Dart cares. Unlike any language in history, Dart also has anonymous functions. What's that function's name? Dart doesn't have to tell you.

As long as it kills Javascript (2, Insightful)

OhANameWhatName (2688401) | about a year and a half ago | (#43789495)

I'll support it. Javascript is a thoroughly horrible language with anachronistic syntax that requires specialised skills to understand. If Dart has the potential to rid my life of Javascript, please Google .. get it out there!!

Re:As long as it kills Javascript (1)

MrBandersnatch (544818) | about a year and a half ago | (#43789635)

On that front I will agree however Dart really doesnt solve my major complaint with the "web" languages - its still "slow" when compared with Java/C++, although it is of course early days. Personally all I want is a language (Dartish/Rubyish) thats as fast as Java....but that ISN'T Java (or Javascript). Seriously considering investing some time in Scala with the Play framework....

Re:As long as it kills Javascript (0)

Anonymous Coward | about a year and a half ago | (#43790197)

Seriously considering investing some time in Scala with the Play framework....

I've invested lots of time into Scala and it's thoroughly horrible. If you want FP use Haskell, F#, an ML or Clojure. Scala is just a mess...

Re:As long as it kills Javascript (0)

Anonymous Coward | about a year and a half ago | (#43789825)

Um, Dart is basically an inferior Ecmascript 6. All Google is doing is holding back modern Javascript by not focusing on it and evangelizing their own inferior products.

Thanks alot a**h**** (-1)

Anonymous Coward | about a year and a half ago | (#43789511)

I read this article and a few comments, never heard of dart, never cared, still don't care actually...

But I just went back to my IDE and was about to create a new file when I noticed that Dart is an option... I was happier when my tunnel vision kept that list smaller.

Not to mention I just wasted 3 minutes coming here to bitch to you about it.

There are problems with new languages (3, Insightful)

angel'o'sphere (80593) | about a year and a half ago | (#43789647)

One Problem is teaching.

One problem is "compatibility" or "easy to learn". E.G. regarding keywords.

C has a keyword: static.
C++ has the same keyword: static.
As Java aimed to be similar to C++ and "easy to learn" it also has a keyword static.

While the meaning of the "keyword" in Java and C++ is the same, it differs from C. (Oh! and this already is not true as you can use 'static' in C++ similar to C if you just use it for free functions and data).

So what does 'static' mean?

http://dictionary.reference.com/browse/static [reference.com]
http://www.thefreedictionary.com/static [thefreedictionary.com]
http://www.merriam-webster.com/dictionary/static [merriam-webster.com]
http://oxforddictionaries.com/definition/english/static [oxforddictionaries.com]

Unfortunately 'static' in a programming language has no meaning at all. Why is the "starting method" in Java called "static void main(String[] args) {}"? Yeah, because in C and C++ it is called main(). Pascal has not that problem.

What do you think a non native english (oh, well what about the english?) considers if he hears the word 'static'?

Good, now lets bash Python and Groovy. What is a "def"? Oh? A definition? Are you certain you can distinguish what the difference between a definition and a declaration is?

So "methods" are now "declared" (or is it defined?) by the introducing keyword "def"? Oh, for fuck sake, I got it wrong again.

Oki, in Python you declare, oh no!!!! you define methods with the keyword "def". In Groovy you define variables (oh! no!!!!! you declare!!!) with the keyword "def".

Yeah, I could rant forever ...

All new languages we see here and there are only languages for programmers that already can program.

But, what is about expressing your mind?

What about teaching programming? Imho Java is one of the most difficult languages to teach. Why? Because you need to know already so much about programming to grasp it!!!!! (Same for C# ofc).

However: modern times show: you don't need to understand Java/C# (just a replacement for most modern languages) because the programing tasks a modern developer has (especially compared to the tools he has at hand) is so mondane. C++ on the other hand only shows how super smart and knowing you need to be to use the language, or not to shoot into your foot.

So where are we?

New languages should use new keywords, that describe precisely what they mean. No void, no static, no final or for that matter finally, no fucking def, var or func. Did I forget one? I certainly did. And they should have reasonable defaults. I hate Java meanwhile, "public void doit() {}", "private boolean done = false". Then we get to "static final String DID_WE_DO_IT = "yes we did";" What is so hard in having methods be PUBLIC by DEFAULT and attributes PRIVATE by DEFAULT?
Writing code is still possible, even if it hurts my hands and my eyes. But reading? I simply don't want to read code anymore ... neither C++ nor Java nor C#. The redundancy hurts me literally.
In a typical Eclipse window I would estimate 30% of all characters/words are simply superfluous. And the fact that they all have a different colour emphasizes this.

How would a real world language look to you if it was written like this: "I want (that is me the guy writing) that we (that is us, you who are listening, and me who is talking) that we (well, dont be mistaken, I only want it, it is not an order) that we (yes, I invite you to participate) go to the beach (and want does not mean it is super important ... it is kinda void)? (And all words in () above in a different colour? Like pink (ARRRRGGG!!!!) light green ( /*facepalm*/), dark and light blue, emphazised(bold) full capitals red?

C was once invented to be a portable assembler. The main idea was to be able to use a few letters to describe an algorithm. Like "void strcpy(char* dest, char* src) { while (*dest++ = *src++); } // note the ";"

(That is not even K&R C, why it is not, is left as an exercise for the reader). I agree however that this was a good thing.

But that does not mean that a modern language needs a type called "void". It does not mean it needs a keyword "static", nor "func", "def" or anything fancy which is not in our natural languages.

DISCLAIMER: I program since 30 years, I know all that stuff above (and a little bit more, I speak/write more programming languages fluent than you ever have heard about).

However: how the fuck do you explain someone who starts programming what "static void main(String[] args) { ... }" is supposed to mean?

Sure, you can explain it: however this is the first thing he meets in his lecture.
a) static
b) void
c) main
d) String
e) array notation []

You have to explain 5 things which you only can understand if you already know C/C++.

In Pascal this is just:
"BEGIN ....
END." // note the period

(Sorry for the typoes, it is late)

Re:There are problems with new languages (0)

Anonymous Coward | about a year and a half ago | (#43789949)

>However: how the fuck do you explain someone who starts programming what "static void main(String[] args) { ... }" is supposed to mean?

Generally? They start with "this is the way you do it" and explain later.

If you program twice as well as you argue, you should have stopped 28 years ago. Pascal is dead* and good riddance.

* In that only a moron would write new code in it. Much like COBOL, legacy code is here to stay.

Re:There are problems with new languages (3, Insightful)

Kielistic (1273232) | about a year and a half ago | (#43790029)

If you think all those words are superfluous you probably don't have much knowledge of compilers or IDEs. The static keyword has very well defined meaning in every language it is used in. As do all those other keywords you seem to hate. Should we kill modern programming languages and go back to what, a stripped down functional paradigm because you deem all this stuff superfluous and hard to teach to beginners?

Programming is about precision. I should never have to guess at what the compiler is going to do with my code; programming is not a natural language. You are damn right I want a void return type. I want OO static members. I want all the information that can be put into method/function/variable definitions so I can take a quick glance and see what it does, takes and returns. So that my IDE, if I'm using one, can auto-complete most of the code for me. So that the (JIT-)?compiler or interpreter can understand all kinds of fancy syntax that lets me do more and write less.

Those five things you mention have nothing to do with C or C++. They are programming concepts and pretty basic ones at that. Obviously you have to understand the basics before you can move on to intermediate.

Re:There are problems with new languages (2)

vux984 (928602) | about a year and a half ago | (#43790097)

The static keyword has very well defined meaning in every language it is used in.

I think his point was that that static doesn't map semantically very well. They could have just made the keyword "ketchup" and defined it the same way and it would be no better or worse.

You are damn right I want a void return type

But why call it "void" and why call it a "function" if it doesn't return something?

To be honest, I kind of see his point.

Re:There are problems with new languages (1)

Ateocinico (32734) | about a year and a half ago | (#43790143)

I absolutely agree with you. But until someone young with a new paradigm for translating human intentions to machine code comes around, we must stick to all that context free grammar stuff. That's the origin of all the mess. We need a fresh start in programming languages.

Commendable (1)

countach (534280) | about a year and a half ago | (#43789911)

I like what I read. I'm always conflicted by my good experiences with untyped languages, compared to my good experiences with typed languages finding hard to find bugs. It's nice to see people looking at how they can be mixed. And I like they've added some stuff that Java lacks which is useful. (no such method) etc.

The trouble is: it looks too much like Java for it to be likely that anybody will bother. With all languages I usually end up thinking... is this as elegant as Scheme? No? So why bother. I think even CLOS type schemes can have the compiler do type checking, so what do we gain? Has anything ever surpassed Scheme plus whatever favorite libraries, or macro/ object collections you like? I don't think so. Scheme allows you to overlay pretty much anything onto its syntax. It always seemed like the final word to me.

A version of Dart that compiles to asm.js? (2)

ras (84108) | about a year and a half ago | (#43789963)

For those of you who don't know, asm.js [asmjs.org] is a subset of JavaScript that's meant to be easy to compile. In other words if you use asm.js the code your will work in all browsers, but should run faster in some. In that FAQ they say their compiled asm.js runs at about 1/2 the speed of C, making it roughly twice as fast [debian.org] as JavaScript V8 [google.com] .

Which is wonderful, except that JavaScirpt is a prick of a language, and so I'd imagine that asm.js is a tedious, prick of a language. But Dart compiled to asm.js - sounds like a marriage made in heaven.

Type checking (0)

Anonymous Coward | about a year and a half ago | (#43790089)

No type checking means worst code and more bugs.

yalwtf (1)

TomGreenhaw (929233) | about a year and a half ago | (#43790193)

yet another language?
Load More Comments
Slashdot Login

Need an Account?

Forgot your password?