Description

TypeScript, a typed superset of JavaScript that compiles to idiomatic (normal) JavaScript, is designed to make it easier to write cross-platform, application scale, JavaScript that runs in any browser or in any host. It was announced recently while Anders Hejlsberg and other key members of the TypeScript team were attending and speaking at the goto conference (an excellent cross-platform developer event!). Needless to say, Channel 9 was there

Google's V8 and Dart chief architect Lars Bak also happened to be at the event (he's currently leading the Dart team full time). Anders and Lars join us to talk candidly about TypeScript, JavaScript and Dart. Huge thanks to Anders and Lars for this excellent conversation.

Thanks for this amazing interview/discussion!Personally I believe TypeScript has the better chance of (huge) success market wise, although I'd really prefer Dart to "win" because it has the best technological foundation.

When Lars & Co gets the Dart VM up to great speed, perhaps the best/fastest way to run a TypeScript app would be to compile it to Dart (instead of JavaScript) and run it in Chrome?

I think Lars displays no appreciation of the developments that Anders has brought to commercial language practice these last thirty-years. In this interview, it appears that he is trying to explain to Anders (of all people!) the benefits of static typing and an execution engine, in commercial software development process. Lars was essentially preaching to the preacher that wrote the sermon he was reciting!If it were possible to get all vested web browser parties to agree to a new web development language, then I am sure Anders would be in there helping to define that standard, which incorporates a static typing base with efficient execution engine. As it currently stands, TypeScript provides a very efficient method of dealing with the current status quo, interfacing with third-party languages, and ultimately succeeding in delivering software on-time and to budget.

Lars gave me the feeling that what Anders is trying to do is not worthy, because of Lars' emotion and his attitude But he didn't bring much to the table to throw over Anders! He looked very uncomfortable in some way... I don't know why, because they both want to make the webs' ecosystem better and they both do, but in a different ways, but that is a GOOD thing!... Competition is always good.. Even if the competitions have a different strategy... Maybe we will use Dart in the future as a new runtime. Maybe TypeScript will fullfill most needs. The future will tell... I love to follow, and use, both...

I'm not going to bother giving a long comment as any dev worth their salt would have already been disappointed... But I will say that when I saw these two together I got giddy and was expecting nothing less than a masterpiece of conversation. Somehow it turned into a church-vs-church fiasco. Wish they would've gotten deeper than tree-shaking and actually spent time on matters which actually defined their design decisions and helped one another understand each others essential conceptual logic for why their solutions were chosen and different by design.

@Drew and @EvBerkel, FWIW, I did not get the same impression that you did, I think they both did a good display in this interview, they both know that they both know that they are both technological heavyweights. (I've been a fan of Anders H. since Delphi 1, so I'm not anti-Anders!) Anders seems extremely relaxed in these kinds of discussions, I guess it's both his nature and his massive experience with interviews.

@EvBerkel: Having been there... I know Lars was happy with a new approach to making a more structured web (as it relates to developing web applications that run inside browsers...). I also know Lars is not very comfortable being in the spotlight and there were literally two of them shining on him Given this, he did a great job and his honesty and candor are quite admirable. Same is true for Anders, though he is much more comfortable in front of a camera since he's a seasoned C9 veteran.

@Charles:You did a fine job as always Charles!! don't sweat it... it just wasn't what I was expecting Somehow things went in unusual directions on their own even with your moderation and productive input throughout.

""@fabnoy: Lars is an intense person. I think he did great in this conversation (he doesn't like being in the spotlight, so perhaps he was a little bit nervous...).

Google's lucky to have Lars and his team of excellent engineers in Aarhus. They've done great things for the web.

C""

Well said Charles, great attitude!

After watching this till the end, overcoming my dislike of Lars conduct, I see him in a different light. As he says, he is impatient and wants a change now :-) He's been in the field too long (lol). BTW, many dotnet fans want the same thing but want MSIL to be the universal byte code, Zeus forbids.

Now I see the conversation in a different light: the older more conservative guy and the younger rebel.

Attitude towards Microsoft changing something so drastically and powerful (like for example Web CLR (Silverlight)) always meets strong resistance from masses. However, when Google does the same (Dart is the same Web CLR with fallback to legacy JS VM), people see this like a great innovation.

I don't know how to change this, maybe dropping further development of Silverlight was a big mistake, or XAML as a main presentation layers was too big obstacle for mass adoption and HTML would be better, or not open-sourcing Silverlight CLR was no-go. C# has already dynamic typing, so basically C# is somewhat dynamic language with JS properties in addition to fundamental static typing.

Anyway, I hope Microsoft will make the proper conclusions from this lesson.

The idea of Google is clear, Chrome has built-in support for Dart, so all Dart stuff will be running fast in Chrome on every platform. Other browsers will have to follow to stay competitive by building-in open-sourced implementation of Dart in their engines. Or stay with slow JS, produced by Dart compilers. I see already Google proclaiming "Dart is fastest in Chrome, FF (and maybe Safari)!", developers are moving to Dart, increasing the demand for Dart VM in the world. When Microsoft would finish TypeScript, there will be already the better alternative supported by most browsers. Who would need JS/TS then?

I believe JS is broken enough to retire it completely. I agree with Lars than W3C will not let it develop into usable web application scope language in next 20 years. So someone has to take a lead there. I hope it will be a software company, not an advertisement one.

@felix9: I thought this a great interview, and fabulous that Google & Microsoft can come together to discuss issues affecting web development.

I think Lars very very smart, impatient and competitive research wise, but a little bit more respect for Anders would have resulted in a perfect interview. It could be that they are both Danish, and something was lost in translation.

I can understand Lars position. He was interviewed by a MS guy at the end, so not a neutral arena neutral.

I also think that TypeScript is fundamentally corrosive for Dart success. In order for the web to get better, JavaScript should be replaced by something better, but if there's great tooling for JavaScript (and Anders will make it), then there's almost no advantage in using something like Dart, so the big leap will never happen.

So Lars is worried for a good reason, in a year Darts is dead and the web won't have much hope for a (much) better future. He will have to change his job too.

Given said that, I don't see a reason why C# won't be a better language for the web than Dart. And Dart doesn't look like having much traction anyway.

The only way to make a big leap will be that the biggest browsers (Microsoft, Google, Apple and Mozilla) and websites (Google, Facebook, Twitter) agree on a language and they all jump together. This looks unreasonable right now, so we will stay messy for long.

Just a few years ago Microsoft was pushing Silverlight while Google conquered the world playing conservative with V8. Microsoft is fighting back the same way now.

I'll go against the grain here. This interview was not exactly set up in a neutral way, but nonetheless Lars Bak did make a lot of excellent points about integers, dynamic checking, tree shaking, etc. He was respectful enough IMO. A heated debate is more interesting than one where everybody agrees. That Anders has done some great work does not mean that Lars is not allowed to give a counterpoint. A technical discussion should be about tech, not about status as perceived by a certain audience. Not to mention that Lars has also done amazing work!

@Alladin: I'm thinking the same thing about XAML + WebCLR as a good replacement for HTML+JS.

Sooner or later we need to ditch the God-awful HTML standard and the God-awful EcmaScript mess that we're currently using as basis for client web applications. Come on, HTML 5 isn't a solution at all, it's simply a patch that's 10 years too late.

XAML as an open loyalty-free standard with some kind of open loyalty-free runtime would have been a great solution here. However, it cannot be Microsoft or another privately-held actor that holds it - it must be W3C or some other neutral consortium.

@Alladin MS proposal (Silverlight) was closed source and windows/Mac only. It's a good thing it's dead now (well almost). I think the killer Dart feature will be faster startup in VM (snapshoting) and one lang on client and server side. Also no serious tooling for OSX will not help Typescript as opposed to Dart IDE available for all relevant OSes. Modern big web apps are done on macs and deployed on linuxes (amazon twitter google facebook) where .net is not present atm.Anders is a huge personality. It's alway pleasure to hear him.

@felix9: There was no whiteboard in the room and Erik was off managing his GOTO track. Plus, I wanted to conduct this interview. These are two of my favorite engineers.

The goal here was candid technical conversation versus in depth treatment of implementation details. If this is something folks would like (implementation details) regarding TypeScript, I could probably set up an interview with the main TS compiler dev.

Felix, you'll get your Erik fix in an interview shot the day before with him and Gilad Bracha geeking out in Aarhus. Also, as mentioned in the interview, Lars joined us again (thank you, Lars!) for a conversation with Chakra's chief architect, Steve Lucco. Stay tuned...

I agree with the comments that say that Lars was somehow uncomfortable.I also think one reason was that he was not in a neutral terrain. Even though Anders and Charles did everything good hosts do to make their guest feel comfortable.In my view he was also somehow more agressive while Anders was very relaxed.I think Anders is so experienced that he knows, that a big community will never just change its habits and learn a new language, just to have better performance on one browser.Specially web developers, just would accept changes, if the changes make their lives much easier. The problem of the typical javascript developer is not performance ( Lars seems to see this more from the benchmark perspective), it is maintaining growing codebases and productivity.

So, in my view Alladin is right, Dart is a strategic move for having the best experience under Chrome. The developers of Dart were perhaps more focused in getting better benchmark results than really helping the community.That is why I agree with Olmo, that Dart will have no success. Now with Typescript in the field Dart will haven even worse chances for success.I think the Typescript team really focused on the community and tried to understand what the community needs, instead of creating yet another static typed language and stating that good devs have to use this and ditch Javascript completely.

@Tomasz Kubacki: From my expertise with an enterprise level software background: majority of software (including web apps) is developed under Windows, with .NET/Java, Oracle, and deployed on Windows Servers etc. Most projects are done with WPF/C#, some with SL/OOB to simplify deployment and reach on Mac. After professional development with C#, JS web client development (even with a crutch like TypeScript) looks like a we are back in late 90x.

Pure web apps are just fallback solutions or simply are not interesting, because mobile apps are not very interesting for enterprises due to security reasons of mobile devices. Enterprises still don't trust iOS/Android on mobiles. BYOD is a myth in enterprises which care about security.

After Windows 8, most of WPF/SL XAML apps will be downgraded to WinRT/XAML to make tablet-friendly versions.

Maybe FB, Amazon and Co are deployed on linuxes and developing on Macs, I tell what I see - no macs, no linuxes, no Dart is actually seen, thus needed.

What is definitely regretted is that MS tries to abandon such a beautiful technology as Silverlight neither open-sourcing it nor supporting it on WinRT, nor making it cross-platform, embedding in browser like Flash, etc.

@Alladin where is windows tablet ? Where are windows mobiles ? iPad is industry standard atm i don't see how could win8 tablets beat it.Web apps with a good tooling will be easier to develop than Windows.Forms. Enterprises are always least with unproven technology (and Dart is not even M1 atm). But we can see on startups market what's going to happen with IT industry future. Seen any "windows" startup on Hacker News ?

Recently tried VS2012 and couldn't change button color on WPF app from properties property grid (btw they killed most useful VS window), something which was just very easy on windows.forms. Windows app development is bringing more and more friction for an average dev. I love C# - it beautiful language (and thanks to the mono project it can be run on every modern platform) - but MS tooling is getting worse these days IMO.

I understand Anders is being very practical and doing the best he can given all of the constraints around web and javascript.

I think instead of a 'language' standard, we should have a VM standard for browsers. If we have a VM standard then we could use any language we want. There will be constraints that all languages will have to adhere to, for interoperability but it's doable. Note both the CLR and JVM have evolved to support a large variety of languages so its technically feasible.

I don't see any standardization effort in regards to a browser VM. Clearly it is needed because javascript can only be taken so far.

I think that Microsoft has accepted the fact that they can't dictate the Web anymore (like they tried with Silverlight) but instead contribute to a steady improvement of the current state-of-the-art. And therefore I like TypeScript very much because using JavaScript as a programmer now starts to make sense to me.

Lars is very passionate and impatient about Dart and it might be a lot better language but I don't think that Google has the power to make this the lingua franca of browser development.

Javascript was never intended for large/complex applications. Javascript will collaspe under its own weight at some point. A NEW brower "language" is needed. MS should go with the CLI and XAML. DART is a good start from Google.

Two great software engineers with a lot of respect for eachother and their complementary work. I don't think you have to be a Dane to see that.

Dart appears a little more idealistic while TypeScript is super pragmatic and still a great step forward for building more complex apps. I don't know how you cannot like this diversity and plethora of choice.

The next generation of web developers are lucky to have this wealth of diversity at their fingertips. I look back 10-15 years and think about the sorry state of things back then and how much better things are.

Still, I will not say I love the browser stack, DOM, etc. At some point it will transform into something very different and this organic process is fascinating to watch.

History has abandon C in favour of much improved ways of expressing solutions (C++, C#, Java, etc...) ... for same reasons we should not continue to prop-up "JavaScript"; and posturing that is "not completely broken"... but build foundation for modern applications that clearly JavaScript was never envision for (runtime/design-time).

Supporting lowest common denominator is not progress. 17 year of JavaScript... let's have an alternative... for moment we did have it XAML/C# in browser.

Last 10 years of language innovations... and now we are heading towards "Scripting" (aka hacking)?

I understand Anders is being very practical and doing the best he can given all of the constraints around web and javascript.

I think instead of a 'language' standard, we should have a VM standard for browsers. If we have a VM standard then we could use any language we want. There will be constraints that all languages will have to adhere to, for interoperability but it's doable. Note both the CLR and JVM have evolved to support a large variety of languages so its technically feasible.

I don't see any standardization effort in regards to a browser VM. Clearly it is needed because javascript can only be taken so far.

Exactly. A VM standard would be great.

The CLR/DLR have proven the benefits provided by this approach.

Developers wouldn't have to be tied to a language unfit for the problem they're tying to solve, or with which they are not as productive. They can pick the language that best suits them while benefitting from cross-language compatible class libraries, VM optimizations, tooling and infrastructure. The CLI is an ECMA and ISO standard. The DLR is open-source. There's already third-party implementations of the technologies in various profiles. It's long overdue for MS to get together with Xamarin and whomever else would be interested, and come up with a proposal for a standard I'll call Web\CLI.

There's also no reason XAML couldn't be part of that proposed standard as a new markup language for the web. HTML could still be supported for legacy, or even continue to be evolved for some time, gaining the benefits of the new platform. Really, the new platform could give choice of presentation language to the developer as well, since it could be possible for a third-party to implement their own presentation language whose compiler could be downloaded as a resource when the page is loaded, further enabling innovation and domain-tailored solutions, while remaining compatible with the underlying platform and just working transparently for the end-user.

Web\CLI could also solve the CODEC issue, as Silverlight did, by enabling managed-code CODECs to be provided with the application, so if you want to publish your videos in VP8 instead of H.264, for instance, just provide the CODEC, and the end-user's browser would use it, either always, or only if the browser didn't have built-in support for the format (that's a detail left to the browser vendor or standards org). It could work for images, audio, video, maybe even document formats. It'd be like WIC (Windows Imaging Component) for the web. Again, for the end-user, they'd simply get an experience that just worked, and the developer would get the tools and languages most comfortable to them.

@n4cer:Completely agree. I was thinking same as I was watching. Why on earth not just make a common IL. All languages (including xaml) would only have to compile down to common IL. IL would be much easier for committee to agree on also as naming and such would not be a major issue as it would be abstracted anyway. Already well known in the art so don't have to start from stage 1. Language vendors could then also supply decompiler plug-ins for their language for the developers (users would not care or need a decompiler) to view page code in their language of choice. Because libraries and tooling would use IL also, the language of choice could interact with language constructs on the language of choice (i.e. public interfaces, Casing, etc). Win-win.

This would completely stop the issue of language discussions and what is best. As Anders has pointed out in past, language design is hard and is almost never right out of the gate and incorrect assumptions are always made and you can't change it after release which means you have to spend 5-10 years on beta before release for something this big. It seems forcing javascript on everyone in the browser goes against the whole open INET mentality from the start.

Man those are two hot seats. As committed as each person is to their own technology these two guys really do give a good reflection on where the state of development sits. TypeScript I think will go far because as "not a real language" as javascript is it still appeals to the masses. Bad adoption model I know, so you have to give Lars credit for putting it forward the way he did. I took away js will take off more regardless but there will be consequences.

Anders: "No no no, I've looked at Dart.. It's been a while..."Lars: "Heh, it's been a while.. *smirk*"..

These guys are polar opposites.

The one thing I gathered from this discussion, is that two giant brains on Javascript agree that Javascript is broken enough to warrant a significant alteration, evolution or replacement; where replacement is a long time away. C# for the DOM + Roslyn?

We are just beginning to reap the benefits of JavaScript everywhere. On the (web) client, on the server ( node.js ), on the database ( e.g. MongoDB ), even my editor of choice ( Sublime Text 2 ) stores its config files in JSON format, and it can run at stonkingly fast C++ like speeds thanks to V8 under the hood of Chrome and powering node.

I would take a lot of convincing to move away from JavaScript at the moment. The suspicion is that Microsoft just wants to control things and is threatened by this convergence .

I don't see how you can think that MS is trying to take control of JavaScript. It's a tool that understands native JS as well as conforms closely to ECMA6. This is the same attitude that Lars took in the interview and I seriously doubt that Anders has any goal of this sort. If anything, he'd be for replacing JS completely instead of supporting it with tooling that helps us out. Don't like it? don't use it.. but we have options galore now.

MS tried to do their own JS and failed. They lost.. it's done. They have now embraced it instead of fighting it.

The very title of show was very compelling to watch!! Techno heads from competing companies have to compare and contrast their technologies.. how else this discussion could have been?

I am not sure comparing v8 innovation to Dart innovation is same. As a developer I would not program only for chrome.. though I love google technologies.. I got a feeling the expectation from google (or Lars) is MS could have used Dart VM in IE rather than innovating in JavaScript space. Would be big good for community if all big heads agree on common VM.

But the overall show was good to watch.. nice mix of technical and business issues... wish there are more shows like this.

Great interview. Must say, though that my one concern is that Dart VM must learn from the past track of Java VM. There will be many concerns out there that must be allayed. Version control, backward compatibility, etc... Not sure how many people are going to want to put their trust in that...

Anders should have noted the growing number of TypeScript ".d.ts" files (externally-added Type-Interface definitions) for EXISTING javascript frameworks. After noting that, he should have added that tree-shaking and dead-code removal, is just as possible for dynamically-typed attributes in even JavaScript alone, let-alone Type Script, and more than that, when you add external .d.ts files for the existing frameworks, then algorithm built for TypeScript tree-shaking/dead-code-removal of Typed-code, would just as easily be applied to all existing frameworks. And that's BEFORE additional type-notations are added to existing frameworks, which would make it even better still...Converting a javascript framework into a TypeScript one, is just adding the interface definitions (either externally or internally) and adding some type-notations for internal-function variables. You won't even have to convert pseudo-classical-design-patterns into TypeScript classes in order to get that benefit. The same cannot be said for Dart...And when comparing the run-time static-type-checking with Dart, then performance-wise - a fair comparison would be with javascript-compiled Dart code, and not with a dedicated VM. In that case, there will be no inheret benefit to Dart, outside transpiler-implementational-specs. And being these 2 projects open-source on the transpiler side, I predict no advantage to either solution regarding injected-type-checking for run-time in javascript - they will copy best practices from each other on that regard.

I liked the following comments on the interview:

"Microsoft has accepted the fact that they can't dictate the Web anymore ... but instead contribute to a steady improvement of the current state-of-the-art."

"Google is the old Microsoft now and Microsoft is not your dads Microsoft anymore. TypeScript is easy, makes sense and finally JS will become 1st class citizen"

"Lars' is demeanor is one of defensiveness about Dart. I get the sense that he believes TypeScript to be a threat to the success of Dart."

"TypeScript is fundamentally corrosive for Dart success. In order for the web to get better, JavaScript should be replaced by something better, but if there's great tooling for JavaScript, then there's almost no advantage in using something like Dart, so the big leap will never happen. "

Really nice discussion. Thank you very much! Anyway, I am still confused. So far with TypoScript, Dart and ClojureScript I see three promising technologies that try to solve some JavaScript issues. Nevertheless, why do I need another VM? What kind of problems does another VM solve that cannot be solved by TypoScript and ClojureScript alone?

I understand from the forums that you, Anders Hejlsberg, are the one who decided not to continue Visual Basic 6.0 in 2000. Well, now that nobody really uses the Miscrosoft programming languages made after 2000, what do you have to say in your defense ?

Do you know that Visual Basic 6.0 is the most successful programming language that Microsoft has ever produced?

Why don't you update (not to much because you do not know what you're doing compared to the genius programmers from the 90's) the VB6 language and put it on the market? This language has more programmers in 2018 than any other Microsoft programming language. You do not believe me? dig a bit in the statistics.