Microsoft introduces TypedScript - there goes the neighborhood

1,150 views
Skip to first unread message

Kevin Moore

unread,
Oct 1, 2012, 1:54:55 PM10/1/12
to General Dart Discussion
http://www.typescriptlang.org/

TypeScript is a language for application-scale JavaScript development.
TypeScript is a typed superset of JavaScript that compiles to plain JavaScript.
Any browser. Any host. Any OS. Open Source.

Kevin Moore

unread,
Oct 1, 2012, 1:59:08 PM10/1/12
to mi...@dartlang.org
Er, TypeScript. No 'd'.

Don Olmstead

unread,
Oct 1, 2012, 2:00:47 PM10/1/12
to mi...@dartlang.org
That just makes me want a Visual Studio plugin for Dart.

--
Consider asking HOWTO questions at Stack Overflow: http://stackoverflow.com/tags/dart
 
 

W. Brian Gourlie

unread,
Oct 1, 2012, 2:08:24 PM10/1/12
to mi...@dartlang.org
It's certainly less ambitious than dart, but does add optional typing, modules, and classical inheritance while retaining javascript's syntax and semantics.  What's interesting is that they call it statically-typed, even though all type checking is lost at compile time just like dart.  It seems like a bit of a marketing move, as "optionally-typed" hasn't been well received by people who take a cursory glance at dart.

On one hand, it's nice to see a competing solution, but on the other hand, it's not doing enough to fix what's wrong.  It would have been really nice to see MS throw their weight behind dart as unlikely as that would be.  First-class Visual Studio integration would be amazing.

Don Olmstead

unread,
Oct 1, 2012, 2:13:40 PM10/1/12
to mi...@dartlang.org
http://pytools.codeplex.com/ actually works pretty well. There must be a way to do the same with Dart.
eclipse.png

Kai Sellgren

unread,
Oct 1, 2012, 2:21:20 PM10/1/12
to mi...@dartlang.org
So it's a compiler like dart2js and a Visual Studio support for it. I wonder if they have thought about shipping a VM within IE for this...

John Evans

unread,
Oct 1, 2012, 2:41:29 PM10/1/12
to mi...@dartlang.org
Does it have a dedicated VM?  I didn't see any mention of one.

Don Olmstead

unread,
Oct 1, 2012, 2:43:10 PM10/1/12
to mi...@dartlang.org
No dedicated VM. Seems similarish to using the closure compiler, but with good tools.

--

Kevin Moore

unread,
Oct 1, 2012, 2:44:10 PM10/1/12
to mi...@dartlang.org
The ability to bootstrap w/ npm install -g typescript is awesome.

John Evans

unread,
Oct 1, 2012, 2:45:32 PM10/1/12
to mi...@dartlang.org
I have all kinds of time to play with this today, since this: http://code.google.com/p/dart/issues/detail?id=5583 :(

Ruud Poutsma

unread,
Oct 1, 2012, 3:00:22 PM10/1/12
to mi...@dartlang.org
No mirrors. No treeshaking. No implicit interfaces. No VM while natively supporting js. No vibrant community. No WebComponents activity. No auto-updating browser. 

They do have a statement condemning dart, while creating a very dartish alternative.

Cool to see Google force Microsoft into creating this. If anything, this is a very concrete example of a win of the Dart project. Congratulations, everyone here!

Ruud

Op maandag 1 oktober 2012 20:45:32 UTC+2 schreef John Evans het volgende:

Colin Jack

unread,
Oct 1, 2012, 3:35:49 PM10/1/12
to mi...@dartlang.org
@Ruud
I'm not against Dart but I think you're way off here.

Vibrant community in question would be a portion of the JavaScript community. MS have really done a job here. Google announce Dart nearly a year ago and still it's not really usable because of lack of interop, where as MS bring out TS and on day one there is an NPM module. 

Whether Dart succeeds long term, who knows. But short term the approach MS are taking, putting things out you can use to build proper software right now, seems to be quite in keeping with the vibrant JavaScript community.

W. Brian Gourlie

unread,
Oct 1, 2012, 4:03:04 PM10/1/12
to mi...@dartlang.org
> Google announce Dart nearly a year ago and still it's not really usable because of lack of interop

This is not a fair comparison.  TypeScript is an optionally-typed superset of Javascript.  Dart is an entirely new language with different syntax and semantics.  TypeScript is far less ambitious and therefore much easier to implement.  It's not going nearly as far as Dart in fixing what is wrong with in-browser web development.

Colin Jack

unread,
Oct 1, 2012, 4:23:46 PM10/1/12
to mi...@dartlang.org
"This is not a fair comparison.  TypeScript is an optionally-typed superset of Javascript.  Dart is an entirely new language with different syntax and semantics.  TypeScript is far less ambitious and therefore much easier to implement.  It's not going nearly as far as Dart in fixing what is wrong with in-browser web development."

Sorry yeah I mentioned the more ambitious caveat but must have removed it. I agree with that bit of course. 

Having said that I think it can be over-rated, technical ambition is one thing but there is also the ambition for a technology to start making some impact on the world. To most people if TS gives them something useful (and I think it might) and they can build real software with it immediately then it'll be far more interesting than Dart. 

Not least as if it does catch on and people do build things with it then it'll be discussed on blogs and so on, which definitely isn't happening with Dart as far as I can see.

Cassio Tavares

unread,
Oct 1, 2012, 4:38:48 PM10/1/12
to mi...@dartlang.org
Hi Colin.

Why do you say that we can't use Dart to build apps right now? I'm using Dart + ASP.NET and it's working very well. Are you talking about the VM, dart2JS or both?

Cassio

W. Brian Gourlie

unread,
Oct 1, 2012, 4:44:05 PM10/1/12
to mi...@dartlang.org
I think the more ambitious approach is warranted.  The web is quickly becoming the only *truly* ubiquitous platform.  What was designed as a scripting language to do relatively trivial things is now being used to write full-blown applications.  While Microsoft is taking the more pragmatic approach in attacking only the low-hanging fruit, I feel like Google is designing a language from the ground up that, even if its intent wasn't to replace javascript, would be pleasant to work with in its own regard.  At some point, it will be obvious that incremental changes to javascript are not going to be sufficient in getting web development to the point where it needs to be. 

Christopher Wright

unread,
Oct 1, 2012, 4:46:55 PM10/1/12
to General Dart Discussion
I grant that the scope of Dart is a fair bit larger, but the languages have the same basic purpose. The fact that Dart is more thorough is not compelling if Dart is perceived as being less production-ready than TypeScript. A direct comparison between the two is warranted, even if unfair.

(You mean Humperdinck *wins*?)

peteroc

unread,
Oct 1, 2012, 4:48:21 PM10/1/12
to mi...@dartlang.org
"Not least as if it does catch on and people do build things with it then it'll be discussed on blogs and so on, which definitely isn't happening with Dart as far as I can see."

It will be discussed on blogs just like coffescript, clojurescript, many others and many more to come. More power to it. But in fairness if Google kept the development of Dart closed and then released it when it was ready then the same would happen with Dart and you wouldn't be in a position to make the complaint you made above. I like the fact that the development of Dart was opened up quite early. It was an education for me. We can't have everything (open development and a product that is released ready to use).

Colin Jack

unread,
Oct 1, 2012, 4:49:52 PM10/1/12
to mi...@dartlang.org
"Why do you say that we can't use Dart to build apps right now? I'm using Dart + ASP.NET and it's working very well. Are you talking about the VM, dart2JS or both?"

I'm really saying that there is so much already available in the JavaScript space, whether in the browser or on the server-side with node, that most people aren't going to consider using Dart at all until there is a really good interop story. 

Colin Jack

unread,
Oct 1, 2012, 4:53:57 PM10/1/12
to mi...@dartlang.org
"I think the more ambitious approach is warranted.  The web is quickly becoming the only *truly* ubiquitous platform.  What was designed as a scripting language to do relatively trivial things is now being used to write full-blown applications.  While Microsoft is taking the more pragmatic approach in attacking only the low-hanging fruit, I feel like Google is designing a language from the ground up that, even if its intent wasn't to replace javascript, would be pleasant to work with in its own regard.  At some point, it will be obvious that incremental changes to javascript are not going to be sufficient in getting web development to the point where it needs to be. "

I maybe need to catch up with Dart again TBH, like most people I somewhat switched off once I realised it wasn't something that we could use currently and the few dart blogs I do follow still go on about the language features. 

Not that those language features aren't great but on their own they don't change the world and don't look a million miles away from TS, but I guess its things like Dart Web Components you're talking about?

Anyway yeah I agree, there's lots of room for improvement and I do love the fact Google is focussing on the big picture, not just solving the language issue...just not sure the strategy on Dart is quite right.

mythz

unread,
Oct 1, 2012, 4:57:08 PM10/1/12
to mi...@dartlang.org
most people aren't going to consider using Dart at all until there is a really good interop story.  

Dart does have a good JS interop story: http://www.dartlang.org/articles/js-dart-interop/ 
It's probably about the best you can get whilst supporting 2 VMs.

Colin Jack

unread,
Oct 1, 2012, 4:58:46 PM10/1/12
to mi...@dartlang.org
"I like the fact that the development of Dart was opened up quite early. It was an education for me. We can't have everything (open development and a product that is released ready to use)."

Agreed, its not surprising it wasn't ready to use a year ago. I am though surprised its still not really ready for use.

May sound like I'm trolling, I'm really not. I loved the look of Dart the language when it was announced and still have some hope for it.

Jean Bonbeur

unread,
Oct 1, 2012, 4:59:22 PM10/1/12
to mi...@dartlang.org
I think that there must be some panic meetings going on now in the Dart team, as well as in the ECMAScript committee.
And that's deserved, for the inaptitude of both to deliver a real pragmatic solution now to the worst Javascript flaws.

Judging by the lack of buzz Dart does on the web, it's probably too far fetched for the humble Javascript developer. And ECMAScript 6 is clearly a design-by-committee death march project.

W. Brian Gourlie

unread,
Oct 1, 2012, 5:16:30 PM10/1/12
to mi...@dartlang.org
One thing that I can say about Dart is its reputation precedes it, fueled by the fact that "the internet" tends to have strong opinions about things while lacking the familiarity to warrant them.  The general sentiment is that Dart is a java-like replacement for javascript with a type-system suffering an identity crisis whose ultimate goal is to lock users into Chrome.  ::facepalm::

Whether or not you think any the of the language features are compelling, what *is* compelling (and definitely understated) are the simplified semantics.  I think this video sums it up nicely: http://www.youtube.com/watch?v=kXEgk1Hdze0

Christopher Wright

unread,
Oct 1, 2012, 5:40:33 PM10/1/12
to General Dart Discussion
If I were to guess, I'd think the sentiment among the Dart team would be closer to "good luck to them".

Seriously, it's not a secret cabal meeting in dark robes over flickering candles, discussing world domination in a hissing mutter. (Except for every other Thursday, and even then, the world domination stuff is just for show.) If Dart is awesome enough, people will use it. And that's all that the Dart team is focussing on.


Bob Nystrom

unread,
Oct 1, 2012, 6:16:11 PM10/1/12
to mi...@dartlang.org
On Mon, Oct 1, 2012 at 1:58 PM, Colin Jack <colin...@gmail.com> wrote:
"I like the fact that the development of Dart was opened up quite early. It was an education for me. We can't have everything (open development and a product that is released ready to use)."

Agreed, its not surprising it wasn't ready to use a year ago. I am though surprised its still not really ready for use.

Programming languages, especially open source ones, historically take a long time to reach maturity. Rust has been out several years and is still far from a 1.0. Go just declared 1.0 after being in development for (I think?) three years. 

Some things just don't seem to work well when rushed. We'll get there.

- bob

Bob Nystrom

unread,
Oct 1, 2012, 6:26:14 PM10/1/12
to mi...@dartlang.org
On Mon, Oct 1, 2012 at 2:40 PM, Christopher Wright <dhas...@google.com> wrote:
If I were to guess, I'd think the sentiment among the Dart team would be closer to "good luck to them".

Seriously, it's not a secret cabal meeting in dark robes over flickering candles, discussing world domination in a hissing mutter. (Except for every other Thursday, and even then, the world domination stuff is just for show.)

You promised you wouldn't tell them about Secret Cabal Thursdays.
 
If Dart is awesome enough, people will use it. And that's all that the Dart team is focussing on.



Yes! I'm all for more choice in web languages. I like CoffeeScript and ClojureScript and Roy. We are starting to write really diverse kinds of code for the web, so no one language is best for all programs any more.

TypeScript seems nice if you like JS semantics or have a large JS codebase that you're invested in but you're having maintenance problems at scale. It's path for success is much smoother since it's (mostly?) backwards compatible with JS.

Dart is taking a riskier bet. It's farther from JS in a lot of ways which is, I think, mostly good as a day-to-day Dart programmer, but it makes the barrier of entry higher. But in return for that higher barrier of entry, you get:
  • Tree shaking
  • Getters and setters (though I presume TypeScript will get those eventually)
  • Operator overloading
  • Real block scope, no hoisting, no IIFEs
  • A native VM
  • Sane equality semantics
  • No weird implicit conversion craziness
  • Lexically bound this everywhere
  • Mixins
  • Annotations
  • An import system
  • User-defined subscript operators
  • Generics, with reification
  • Mirrors
  • Better collection classes
  • A cleaner DOM API
I'm sure TypeScript will evolve quickly and gain its own impressive list of nice features but I think Dart has plenty of interesting things going for it too.

Cheers,

- bob

Dart Learn

unread,
Oct 1, 2012, 6:58:54 PM10/1/12
to mi...@dartlang.org
Srsly? TypeScript a new approach to fix JavaScript?

I guess only Silverlight 6 can fix now this interwebs mess.


btw, typescript language specification is 0.8!

Darren Neimke

unread,
Oct 1, 2012, 7:15:42 PM10/1/12
to mi...@dartlang.org
>>The ability to bootstrap w/ npm install -g typescript is awesome.

Can someone explain exactly why this is so awesome please.  Is it because, from day 1, there is native interop between Node and TypeScript?  

And what does that really buy me?  Does that imply that I will be able to freely share packages between TypeScript and Node?  And if so, in reality would that really happen do you think? 



Darren Neimke



--

Kevin Moore

unread,
Oct 1, 2012, 7:19:31 PM10/1/12
to mi...@dartlang.org
Uh, it means you get everything running using one command from a tool many people already have.

That's all. :-/

Darren Neimke

unread,
Oct 1, 2012, 7:29:32 PM10/1/12
to mi...@dartlang.org
Seems odd to me that I don't see it on Microsoft's own package management site:


Yes I get that having it available via npm might be "cool"... but making it available to the Microsoft developer hordes via Nuget would have seemed a whole lot more practical?



Darren Neimke

Ladislav Thon

unread,
Oct 2, 2012, 12:22:21 AM10/2/12
to mi...@dartlang.org

Mmm, I'm not really ready to comment on it, as I'm just about to read the spec, but from a cursory glance, this looks like a joke. TypeScript right now looks like a small extension to JavaScript which could make a lot of people happy (even myself, should there be no Dart), but how is it going to look a year later? Given that there is _soo much_ trouble getting ES6 out, TypeScript will probably have to move on its own, and I already take for granted that anything Anders touches turns into a weird mishmash sooner or later (see Object Pascal/Delphi Language and C#). I just think that Dart is better positioned for the future, being a standalone language and not just another syntax layer for the horrible JavaScript semantics.

LT

Mike-Delphi-SQL-TX

unread,
Oct 2, 2012, 1:32:02 AM10/2/12
to mi...@dartlang.org
I took easily to Dart because it reminded me a lot of my favorite desktop-development language and component-set (Delphi), therefor I was entertained to see Anders Hejlsberg presenting TypeScript since he was instrumental in designing Delphi.  And, of course he helped make C# look quite a bit like Delphi... so, now it is time to make JS code a bit more Delphi-like? 

Now that Dart gives me a lot more of what modern Delphi offers (generics, collections, operating overloading, a pretty clean type system nice inheritance, etc) than TypeScript (currently) does, why would I want to use TypeScript?  The simple fact is that the Dart team could make a Dart-2-TypeScript compiler if TypeScript "took off", but the real solution is clearly for ES6 to adopt a proper, modern, class/object based approach to development.   The reason I came to Dart is that I detest JS and its horrendous prototypical-inheritance, etc, for all but the simplest of needs.  Dart saved me from JS hell!  Thank you Dart team! I watched a lot of A.H.'s video, and I don't recall him ever mentioning "Dart", even as it is quite obvious that MS is addressing the same perceived need that Dart is and that Dart is likely a huge motivator for TypeScript.  Thank you Dart! 

I generally agree with Bob N.'s list of Dart qualities worth mentioning, though I do not (currently) fully agree with his "A cleaner DOM API" statement due to the fact that the Dart-based DOM abstraction is causing me multiple problems that I do/did not experience with JS: that is, the Dart "wrapping" of the DOM has hidden access to setting namespaces on elements (which is *required* for certain SVG needs, as reported in various issues I have submitted: #2977, #5395, #5526) and has introduced varying behavior between HTML-wrapped SVG vs standalone-SVG files (something I do not experience when writing native JS code -- the ElementImplementation structures in Dart are screwing things up in this regard).  I also find the DOM API within Dart to be a bit "over-engineered" with regards to making some things that *should* be able to complete quite fast and synchronously instead become an asynchronous mess of convolution and complication, like: Future<ElementRect> for documentElement/viewportElement.rect.  Seriously, who thought this up?  It makes the execution-flow through applications really difficult to manage.  So, a "cleaner API" is one thing, but if I encounter regressions and/or complications that JS's view of the DOM didn't throw into the mix, then "cleaner" doesn't mean that much to me.

So, from where *I* sit, and based on how I am currently using Dart, I see Dart as a very promising development language (that reminds me a lot of Delphi) layered over a somewhat overly-complex/buggy-implementation of interacting with the SVG DOM that I expect I would *not* experience using TypeScript (since it does not try to "improve the DOM" per se).  But, I have hopes that someone will eventually fix the DOM issues I am encountering within the Dart framework and give me a reason to stick with Dart (vs. TypeScript perhaps).  If not, I would bet that Anders H. / Microsoft is going to move JS in the proper direction and, with time, I expect MS will evolve their TypeScript to include much of what Dart offers already.  

I personally don't care if the Dart VM remains "only within Chrome" either, since I am looking at Dart/Dartium as a *business-applications* platform where I can tell my users/clients that "this app requires Dart/Chrome" or whatever. Big deal.  So, browser-adoption of the Dart-VM is not what is going to be the deciding factor for me, but instead: speed of application development, ease of maintainability, execution-speed (to some degree), and maximum code-re-use.  I guess time will tell whether Dart or TypeScript is the "right" approach; it is simply too bad that both could not just team up to make a common modern EcmaScript alternative that just happened to look a lot like Dart. 

On Monday, October 1, 2012 12:54:58 PM UTC-5, Kevin Moore wrote:
http://www.typescriptlang.org/

TypeScript is a language for application-scale JavaScript development.
TypeScript is a typed superset of JavaScript that compiles to plain JavaScript.
Any browser. Any host. Any OS. Open Source.

Darren Neimke

unread,
Oct 2, 2012, 1:53:01 AM10/2/12
to mi...@dartlang.org
>> Everything Anders touches turns into a weird mishmash sooner or later

I don't think that it's fair to say that about C#.  Anything in particular about the C# language that you think falls into that category?


Darren Neimke



On Tue, Oct 2, 2012 at 1:52 PM, Ladislav Thon <lad...@gmail.com> wrote:

Mmm, I'm not really ready to comment on it, as I'm just about to read the spec, but from a cursory glance, this looks like a joke. TypeScript right now looks like a small extension to JavaScript which could make a lot of people happy (even myself, should there be no Dart), but how is it going to look a year later? Given that there is _soo much_ trouble getting ES6 out, TypeScript will probably have to move on its own, and I already take for granted that anything Anders touches turns into a weird mishmash sooner or later (see Object Pascal/Delphi Language and C#). I just think that Dart is better positioned for the future, being a standalone language and not just another syntax layer for the horrible JavaScript semantics.

LT

--

Ladislav Thon

unread,
Oct 2, 2012, 2:24:27 AM10/2/12
to mi...@dartlang.org

from a cursory glance, this looks like a joke


On the other hand, they will have enums!

LT

Don Olmstead

unread,
Oct 2, 2012, 2:48:48 AM10/2/12
to mi...@dartlang.org
enums.jpg

Colin Jack

unread,
Oct 2, 2012, 3:50:19 AM10/2/12
to mi...@dartlang.org
"Can someone explain exactly why this is so awesome please.  Is it because, from day 1, there is native interop between Node and TypeScript?  

And what does that really buy me?  Does that imply that I will be able to freely share packages between TypeScript and Node?  And if so, in reality would that really happen do you think? "

Because if they wanted to get the JS community onside and get people building ings with TS this was the way to do it. For example

http://blog.izs.me/post/32697104162/thoughts-on-typescript

Christoph Husse

unread,
Oct 2, 2012, 4:54:01 AM10/2/12
to mi...@dartlang.org
Hey what about Google fixing this misinformation by putting a link on www.google.com just like for Chrome ;). Well, yes maybe you should wait a bit until Dart is ready for this. But I think the big difference in perception is currently, that NO ONE I told about Dart actually knew it. So it seems as if Dart is somewhat the silent guardian of the modern web :D. I hope when the time comes (hopefully soon) I will have people asking me about Dart instead...

kc

unread,
Oct 2, 2012, 6:09:02 AM10/2/12
to mi...@dartlang.org
If TypeScript plays nicely with WinRT for Win8 apps and gets some performance optimizations - interesting.

Then MS have a language that spans web/desktop/touch (tablets and phones). Dart seems web focused. Android is still java/dalvik.
Also, MS  are trying to keep TypeScript aligned with ES6 developments.
Embrace, extend and extinguish.

WinRT is the real competitor to the open web. dotnet has been sidelined.

mezoni

unread,
Oct 2, 2012, 7:36:47 AM10/2/12
to mi...@dartlang.org
I agree.
This is an alternative for Dart.
Dart, in turn, is also an alternative for something.
All can be compared to something else.
Despite the fact that both of the open source software, they are at least there were not spontaneous and not without reason.
The main thing is that, ultimately, end-users will benefit from the fact that everything is very diverse and there is a choice.
I think that both products have their place.
I think google has your future plans for Dart.
Waiting for the opening the "pub.dartlang.org".
It will be, in my opinion, one of the indicators of popularity.
After that, time will tell.

Darren Neimke

unread,
Oct 2, 2012, 7:38:48 AM10/2/12
to mi...@dartlang.org
I get the sense that, initially at least, TypeScript is all about Azure.  

Waiting for Dart to run on AppEngine.

Then we will see 

:)



Darren Neimke



--

kc

unread,
Oct 2, 2012, 9:42:16 AM10/2/12
to mi...@dartlang.org
Google and MS have both developed trojan horses on JS - with the goal of greater sanity/speed/security/simplicity. (ES6 has this goal - but I fear some ES6 features - modules especially - will be ES4'ed). Both did their foundational work in private and announced them as done deals.

Differences:
- TypeScript is stalking/shadowing ES6 whereas Dart is not. Good stuff in ES6 - private names/for of/iterators - should find there way into TypeScript.
- TypeScript will run sweetly on WinRT touch devices. I think MS will try and make TypeScript the 'native' language for targeting the com based WinRT. com is about interfaces - and look at that interface keyword in TypeScript. The native runtime for TypeScript will substantially eventually be WinRT.
Dart does not seem to be a first class player on android.

MS invented Web2.0/ajax with IE5. MS then produced a pointless Java clone called C# and allowed mozilla/webkit to catch up and surpass them. Now MS have woken up after their decade long detour. Interesting.





Manuel Alejandro Cerón Estrada

unread,
Oct 2, 2012, 10:30:13 AM10/2/12
to mi...@dartlang.org
On Mon, Oct 1, 2012 at 5:26 PM, Bob Nystrom <rnys...@google.com> wrote:
> Dart is taking a riskier bet. It's farther from JS in a lot of ways which
> is, I think, mostly good as a day-to-day Dart programmer, but it makes the
> barrier of entry higher. But in return for that higher barrier of entry, you
> get:
>
> Tree shaking
> Getters and setters (though I presume TypeScript will get those eventually)

They do have getters and setters. It was demoed in the video.

Manuel.

Manuel Alejandro Cerón Estrada

unread,
Oct 2, 2012, 11:12:04 AM10/2/12
to mi...@dartlang.org
On Mon, Oct 1, 2012 at 12:54 PM, Kevin Moore <kev...@j832.com> wrote:
> http://www.typescriptlang.org/
>
> TypeScript is a language for application-scale JavaScript development.
> TypeScript is a typed superset of JavaScript that compiles to plain
> JavaScript.
> Any browser. Any host. Any OS. Open Source.

It looks like Dart is a more ambitious project. But many of the cool
things are not really there yet. For example: mirrors, three shaking.
Typescript offers some interesting things from day zero:

- Full interoperability with the JavaScript world. This is from both
ways: from JS to TS and viceversa. There is a huge ecosystem of code
available for JS.
- I think that TypeScript got some syntax bits much better than Dart.
For example, type annotations are much more flexible, and they look
nicer. Interfaces are better too, they cover all the cases and there
is no need for ugly constructs like "typedef".
- They offer support for private things, both in classes and modules.
- The Visual Studio and Playground demo showed an amazing type
inference engine. I have not seen that with Dart.
- The web playground is really cool. It's a shame that
try.dartlang.org is down. (but it wasn't very cool when it was up
anyway)
- The module system looks better, it's possible to explicitly import
only the things you need from a module. I like that.

There are some things that Dart got better though:

- It really fixes all the insanity of JavaScript.
- More features: operator overloading, string formatting, for-in
loops, better collections, isolates, annotations.
- It improves the DOM.
- Multiplatform IDE. Visual Studio is cool, but I don't wan't to use Windows.

Some things I don't care about:

- The Dart VM. For client side web development, I think it's very
unlikely that other browsers ever implement the Dart VM. Dart2JS will
be the only option for a long time.
- Generics. I don't really see the point of generics for a dynamic
language. The only advantage I see is to get code completion for
collection items, but TypeScript interfaces allows types to be
specified for collections without needing generics, I think I like
that approach more.

Cheers.

Manuel.

John Evans

unread,
Oct 2, 2012, 11:23:59 AM10/2/12
to mi...@dartlang.org

- It really fixes all the insanity of JavaScript.

Sold. 

Aza Tek

unread,
Oct 2, 2012, 11:46:17 AM10/2/12
to mi...@dartlang.org
On Tue, Oct 2, 2012 at 5:23 PM, John Evans <pru...@gmail.com> wrote:

- It really fixes all the insanity of JavaScript.

Sold. 

That point is probably worth about 90% of the argument. 
Another 8% for:
- It improves the DOM

Graham Wheeler

unread,
Oct 2, 2012, 12:37:54 PM10/2/12
to mi...@dartlang.org
@Don - a Visual Studio plugin for Dart is certainly possible. VS has a very good plugin interface, which a team of mine in a past life used to incorporate Microsoft OneApp (a custom mobile Javascript implementation) into VS, including project wizards, a design surface, and debugger support. Not something Google would build, I expect, but Dart programmers working on Windows could take this on, and probably do it quite quickly.



--

Ahmet A. Akın

unread,
Oct 2, 2012, 12:51:29 PM10/2/12
to mi...@dartlang.org
Am I the only one who is not impressed with Visual Studio at all?  I see it at best as a mediocre IDE that only works in Windows. 

@manuel : I care more about the VM than Javascript translation. So TypeScript means nothing to me.

Don Olmstead

unread,
Oct 2, 2012, 1:16:49 PM10/2/12
to mi...@dartlang.org
It depends on your background. When developing C/C++ there's nothing better than Visual Studio + Visual Assist. I've done C/C++ development using Eclipse, it was for an embedded device, and it was a big step down. I'm sure if you've been doing Java dev for awhile you're using something else.

I'm going to give PyTools a look to see how they did everything and give a VS plugin a go for Dart. Guessing I won't look at it till around December though.

Kai Sellgren

unread,
Oct 2, 2012, 1:18:21 PM10/2/12
to mi...@dartlang.org
On Tuesday, October 2, 2012 1:09:03 PM UTC+3, kc wrote:
Then MS have a language that spans web/desktop/touch (tablets and phones). Dart seems web focused. Android is still java/dalvik.

I don't get it. What makes you think TS can span everywhere when Dart can't? If you ever read the source code you would know that Google has indeed been planning on using Dart for Android development. Why else the Android specific code? It would only makes sense to be able to write Android apps, client-side apps and server-side apps all in Dart.

Christoph Husse

unread,
Oct 2, 2012, 1:23:35 PM10/2/12
to mi...@dartlang.org

Am I the only one who is not impressed with Visual Studio at all?  I see it at best as a mediocre IDE that only works in Windows. 

Maybe you are also just a bit biased. I used Visual Studio for the last ten years, now I am on Linux and with Dart I couldn't care less that I can't use it anymore ;).
I don't see how you come to the conclusion that Visual Studio 2012 is a mediocre IDE. That rather says that you actually don't know it. VS is a HUGE monster with quazillion of features and with VS2012 they actually are quite solid and stable. Further, VS lives through Plugins. I think nobody would honestly use VS without Resharper, for one, giving it a refactoring/analysis solution that at least is on par with Eclipse/Java if not even better. There are tons of other useful plugins. But that is only one side of it. VS supports the billions of different project templates for various languages and MS specific "whatever", like Azure Cloud, WCF services, WCF, SQL stored procedures and you name it. If you foget all that, VS still has unmatched debugging capabilities. I have NEVER ever encountered any IDE for any language that comes even close to the debugging experience in Visual Studio. 

So please flame TypeScript, but not Visual Studio ;).

Bob Nystrom

unread,
Oct 2, 2012, 1:23:48 PM10/2/12
to mi...@dartlang.org
I don't want to spend a lot of time comparing Dart and TypeScript because I prefer to understand things on their own, but I could of comments:

On Tue, Oct 2, 2012 at 8:12 AM, Manuel Alejandro Cerón Estrada <cero...@gmail.com> wrote:
On Mon, Oct 1, 2012 at 12:54 PM, Kevin Moore <kev...@j832.com> wrote:
> http://www.typescriptlang.org/
>
> TypeScript is a language for application-scale JavaScript development.
> TypeScript is a typed superset of JavaScript that compiles to plain
> JavaScript.
> Any browser. Any host. Any OS. Open Source.

It looks like Dart is a more ambitious project. But many of the cool
things are not really there yet. For example: mirrors, three shaking.

Dart2js does do some tree shaking already, but it will get better over time.
 
Typescript offers some interesting things from day zero:

- Full interoperability with the JavaScript world. This is from both
ways: from JS to TS and viceversa. There is a huge ecosystem of code
available for JS.
- I think that TypeScript got some syntax bits much better than Dart.
For example, type annotations are much more flexible, and they look
nicer.

I like their type annotation syntax better too.
 
Interfaces are better too, they cover all the cases and there
is no need for ugly constructs like "typedef".

One thing TypeScript does not cover is implicit interfaces. If you have a class type annotation in TypeScript, only that class or a concrete subclass can be used there.
 
- They offer support for private things, both in classes and modules.

TypeScript's privacy is only compile time and has no runtime effect. In particular, it means you have to be careful about inheriting private members (I think). This would do something nasty in TypeScript:

class Base {
  private foo;
}

class Derived extends Base {
  private foo;
}

Whereas in Dart, if you subclass across library boundaries, you can have different private fields with the same name in the same inheritance chain and they are properly disambiguated.

- The Visual Studio and Playground demo showed an amazing type
inference engine. I have not seen that with Dart.

Our Editor's type inference is getting better. Do you have anything in particular where you feel the Editor should have been able to infer something it didn't?
 
- The web playground is really cool. It's a shame that
try.dartlang.org is down. (but it wasn't very cool when it was up
anyway)

I know. I miss it too. :(
 
- The module system looks better, it's possible to explicitly import
only the things you need from a module. I like that.

Dart will support that in M1 with the "show" and "hide" modifier on imports.


- Generics. I don't really see the point of generics for a dynamic
language. The only advantage I see is to get code completion for
collection items, but TypeScript interfaces allows types to be
specified for collections without needing generics, I think I like
that approach more.

Instead of general purpose generics, TypeScript just added one special generic type: arrays. That covers a lot of cases but I personally don't like special-case language features like that. I do occasionally define my own generic types. I also frequently implement the existing collection interfaces with my own types (like making my own iterable objects) and that doesn't really work when you just have a single magic array type.

Cheers!

- bob

Colin Jack

unread,
Oct 2, 2012, 1:38:28 PM10/2/12
to mi...@dartlang.org
> Am I the only one who is not impressed with Visual Studio at all?  I see it at best as a mediocre IDE that only works in Windows. 

Na me too. I've been using it for years, Resharper makes it a much better IDE for sure but I still prefer sublime text not least as I can use it on ubuntu. Some basic refactorings wouldn't do any harm though.

kc

unread,
Oct 2, 2012, 2:12:35 PM10/2/12
to mi...@dartlang.org

TS (and JS) can span the web and WinRT touch devices. Obviously not android (java/dalvik) or iOS (Objective C) devices.

Does the android specific code indicate that Dart can access the android platform api in the same way java/dalvik can? Apps in the Play app store coded in Dart - that would be interesting. This is what MS are offering with TypeScript and their app store/ecosystem.

Ahmet A. Akın

unread,
Oct 2, 2012, 2:30:54 PM10/2/12
to mi...@dartlang.org


On Tuesday, October 2, 2012 8:16:53 PM UTC+3, Don Olmstead wrote:
It depends on your background. When developing C/C++ there's nothing better than Visual Studio + Visual Assist. I've done C/C++ development using Eclipse, it was for an embedded device, and it was a big step down. I'm sure if you've been doing Java dev for awhile you're using something else.

Correct. Intellij idea.

Ladislav Thon

unread,
Oct 2, 2012, 3:03:45 PM10/2/12
to mi...@dartlang.org


> Instead of general purpose generics, TypeScript just added one special generic type: arrays.

They plan to add generics later -- at least they mention it in the spec.

LT

jorat134617

unread,
Oct 2, 2012, 3:28:10 PM10/2/12
to mi...@dartlang.org
No matter how you gonna put it, java is slow and as long as the ide will be created in java, it will never match the performance/memory footprint of vs which is coded in c++/c.

Manuel Alejandro Cerón Estrada

unread,
Oct 2, 2012, 3:31:11 PM10/2/12
to mi...@dartlang.org
On Tue, Oct 2, 2012 at 12:23 PM, Bob Nystrom <rnys...@google.com> wrote:
> Our Editor's type inference is getting better. Do you have anything in
> particular where you feel the Editor should have been able to infer
> something it didn't?

Yes, for example:

getString() => "20.5";
getString().toDouble();

The Dart Editor is not smart enough to infer that getString returns a
String, therefore, the call to "toDouble" won't be marked as an error
or warning, you'll get the error at runtime. The TypeScript playground
does the right thing with a similar example:

var getString = () => "2.5";
getString().toDouble();

BTW, I know the Dart Editor is getting better, and I really appreciate
it. One thing I love about the Dart project is that it's moving really
fast, new features and improvements are released very often. Thanks
for the hard work.

Manuel.

Mark Derricutt

unread,
Oct 2, 2012, 3:42:14 PM10/2/12
to mi...@dartlang.org
For one it means they're actively targetting the growing Javascript community.

Dart - well, you go install a forked browser ( cause dart2js code won't work in Firefox - at least not my simple tests awhile back ), and go install a java based IDE...

The fact that TypedScript also came on day one with Sublime Text 2, Emacs, an VI modes along with the VS integration is also indicative that they're targeting the JS community.

On 2/10/2012, at 12:15 PM, Darren Neimke <darren...@gmail.com> wrote:

>>The ability to bootstrap w/ npm install -g typescript is awesome.

Ahmet A. Akın

unread,
Oct 2, 2012, 3:50:03 PM10/2/12
to mi...@dartlang.org


On Tuesday, October 2, 2012 10:28:10 PM UTC+3, jorat134617 wrote:
No matter how you gonna put it, java is slow and as long as the ide will be created in java, it will never match the performance/memory footprint of vs which is coded in c++/c.

Subject has changed a lot, but here it goes.
To me developing a modern IDE in c/c++ is just madness. The speed advantage C++ in an IDE is a delusion and memory is now abundant if you care about resources. I guess only parts of VS is developed in C++ nowadays only for legacy reasons. All glorious Re-sharper is developed in C#. 

Mike

unread,
Oct 2, 2012, 4:26:29 PM10/2/12
to mi...@dartlang.org
Couldn't agree more with Darren's point above about running Dart on AppEngine.

John Messerly

unread,
Oct 2, 2012, 4:37:05 PM10/2/12
to mi...@dartlang.org
On Tue, Oct 2, 2012 at 12:50 PM, Ahmet A. Akın <ahm...@gmail.com> wrote:
On Tuesday, October 2, 2012 10:28:10 PM UTC+3, jorat134617 wrote:
No matter how you gonna put it, java is slow and as long as the ide will be created in java, it will never match the performance/memory footprint of vs which is coded in c++/c.

Subject has changed a lot, but here it goes.
To me developing a modern IDE in c/c++ is just madness. The speed advantage C++ in an IDE is a delusion and memory is now abundant if you care about resources. I guess only parts of VS is developed in C++ nowadays only for legacy reasons. All glorious Re-sharper is developed in C#. 

This is true. They rewrote the editor and a lot of other parts of VS in C# for 2010. And the compilers have been rewritten in C# and VB.NET for a future version of VS[1].

- John


jorat134617

unread,
Oct 2, 2012, 4:51:36 PM10/2/12
to mi...@dartlang.org
Yea, sorry for the change of subject. But I think that what make a good language is the editor that come with. A good editor has a good syntax highlighting and is speedy. Sinci the introduction of the "analysis as you type", the footprint of the Dart Editor has skyrocket and I can no longer have multiple project open in the editor without having huge memory problem. With just 1 project open now, Dart Editor is 400mb. For a good web developper, you will have Dreamweaver open, Photoshop, Filezilla, 20+ tab in chrome, skype. With that, I ran out of memory. I have a 2 months old i5, 4gb ram, 500gb hd+64gb ssd labtop. Memory isn't now abundant. Every resource is precious.

Also, you just kind of agree with what I said because you said that "All glorious Re-sharper is developed in C#". So, to develop such good tool, the editor must be good and vs isn't coded is c#.

The editor is one the very important piece of a programming language. If it's no good, people will ignore  the new language. It has to be a smooth experience.

jorat134617

unread,
Oct 2, 2012, 4:55:09 PM10/2/12
to mi...@dartlang.org
I'm talking about my experience with older version 2010 and below. So, I have no idea how fast or how memory hungry the new Visual Studio 2012 is.

Graham Wheeler

unread,
Oct 2, 2012, 5:06:44 PM10/2/12
to mi...@dartlang.org
If I read John correctly, VS2010 editor is implemented in C#.


Tom Yeh

unread,
Oct 2, 2012, 10:59:12 PM10/2/12
to mi...@dartlang.org

I generally agree with Bob N.'s list of Dart qualities worth mentioning, though I do not (currently) fully agree with his "A cleaner DOM API" statement due to the fact that the Dart-based DOM abstraction is causing me multiple problems that I do/did not experience with JS: that is, the Dart "wrapping" of the DOM has hidden access to setting namespaces on elements (which is *required* for certain SVG needs, as reported in various issues I have submitted: #2977, #5395, #5526) and has introduced varying behavior between HTML-wrapped SVG vs standalone-SVG files (something I do not experience when writing native JS code -- the ElementImplementation structures in Dart are screwing things up in this regard).  I also find the DOM API within Dart to be a bit "over-engineered" with regards to making some things that *should* be able to complete quite fast and synchronously instead become an asynchronous mess of convolution and complication, like: Future<ElementRect> for documentElement/viewportElement.rect.  Seriously, who thought this up?  It makes the execution-flow through applications really difficult to manage.  So, a "cleaner API" is one thing, but if I encounter regressions and/or complications that JS's view of the DOM didn't throw into the mix, then "cleaner" doesn't mean that much to me.

Well said. DOM API is a bit over-engineered, especially the use of Future. To allow synchronous execution flow, a few methods starting with $ were introduced. It solved the issue but it makes API looks odd.

John Messerly

unread,
Oct 2, 2012, 11:30:30 PM10/2/12
to mi...@dartlang.org
On Tue, Oct 2, 2012 at 7:59 PM, Tom Yeh <tom....@gmail.com> wrote:

I generally agree with Bob N.'s list of Dart qualities worth mentioning, though I do not (currently) fully agree with his "A cleaner DOM API" statement due to the fact that the Dart-based DOM abstraction is causing me multiple problems that I do/did not experience with JS: that is, the Dart "wrapping" of the DOM has hidden access to setting namespaces on elements (which is *required* for certain SVG needs, as reported in various issues I have submitted: #2977, #5395, #5526) and has introduced varying behavior between HTML-wrapped SVG vs standalone-SVG files (something I do not experience when writing native JS code -- the ElementImplementation structures in Dart are screwing things up in this regard).  I also find the DOM API within Dart to be a bit "over-engineered" with regards to making some things that *should* be able to complete quite fast and synchronously instead become an asynchronous mess of convolution and complication, like: Future<ElementRect> for documentElement/viewportElement.rect.  Seriously, who thought this up?  It makes the execution-flow through applications really difficult to manage.  So, a "cleaner API" is one thing, but if I encounter regressions and/or complications that JS's view of the DOM didn't throw into the mix, then "cleaner" doesn't mean that much to me.

Well said. DOM API is a bit over-engineered, especially the use of Future. To allow synchronous execution flow, a few methods starting with $ were introduced. It solved the issue but it makes API looks odd.

FYI, we are planning to fix this. Comment/star this bug: http://dartbug.com/838.

The original goal was to make it harder to write poorly performing code that interacted badly with the browser's layout. I think that goal was successful, but at the expense of making it harder to write any code that uses DOM positions :-)

Florian Loitsch

unread,
Oct 3, 2012, 3:36:30 AM10/3/12
to General Dart Discussion
On Tue, Oct 2, 2012 at 9:42 PM, Mark Derricutt <ma...@talios.com> wrote:
For one it means they're actively targetting the growing Javascript community.

Dart - well, you go install a forked browser ( cause dart2js code won't work in Firefox - at least not my simple tests awhile back ), and go install a java based IDE...
If dart2js code doesn't work in Firefox please let us know (ideally by filing a bug-report). If it's a dart2js problem (and not a DOM difference) I will make it a personal priority to fix it.
 
 
The fact that TypedScript also came on day one with Sublime Text 2, Emacs, an VI modes along with the VS integration is also indicative that they're targeting the JS community.

On 2/10/2012, at 12:15 PM, Darren Neimke <darren...@gmail.com> wrote:

>>The ability to bootstrap w/ npm install -g typescript is awesome.

Can someone explain exactly why this is so awesome please.  Is it because, from day 1, there is native interop between Node and TypeScript? 

--
Consider asking HOWTO questions at Stack Overflow: http://stackoverflow.com/tags/dart
 
 



--
Give a man a fire and he's warm for the whole day,
but set fire to him and he's warm for the rest of his life. - Terry Pratchett

mythz

unread,
Oct 3, 2012, 5:00:28 AM10/3/12
to mi...@dartlang.org
Hey All,

As it may be useful to compare the real-world differences of TypeScript vs Dart, I've ported some of the TypeScript examples over to Dart in a gist at:


I've tried to be as idiomatic Dart as possible and have taken advantage of some its features like operator overloading.

Let me know if there's any changes I can make to make it more idiomatic.

Thanks!
- Demis
Reply all
Reply to author
Forward
0 new messages