r/programming • • Nov 04 '14

"Screw You, Angular"

https://medium.com/@jeffwhelpley/screw-you-angular-62b3889fd678
186 Upvotes

61 comments sorted by

View all comments

Show parent comments

3

u/x-skeww Nov 05 '14

I've played around with both Dart and TypeScript and I have to say that TypeScript is just a better experience overall.

TS interacts seamlessly with JavaScript. That's the only thing it does better than Dart.

That's a very nice feature, but it isn't necessarily the most important thing for everyone.

Personally, I don't care if interacting with JS is a bit clunky. Only some of my code is run in browsers and I don't intend to interact with any JS libraries. I might interact with Google Maps stuff at some point, but that's about it.

Anyhow, AtS also compiles to Dart, in case you weren't aware. While Dart compiles to JS, it's currently not a viable choice for writing frameworks/libraries which are meant to be used from JS land.

If AtScript is going to be driven by the needs of frameworks like Angular then that is the wrong motivation.

Is it? Aren't pretty much all languages driven by some need of some individual/group/company/whatever?

JS is like that. TS is like that. Dart is like that. C# is like that.

Well, some esoteric languages would probably meet your criteria, but I don't really see how "dicking around for the lulz" is a more legitimate motivation.

Anyhow, keep in mind that AtS isn't really a new language. It's ES6 with some type and metadata annotations hot-glued to it. It's a fairly simplistic stopgap solution.

0

u/[deleted] Nov 05 '14

[deleted]

1

u/x-skeww Nov 05 '14

Furthermore the people doing all the design work on C# and TypeScript are actual language designers who have been doing this kind of work for decades.

AtS is design-free. It contains zero new features.

I still can't tell if [Dart] is mostly server-side or client-side language.

You can use it for whatever you want. The standalone VM comes with libraries for doing I/O. It's basically like Node right off the bat.

Like V8, the VM itself is a C++ library which can be embedded in other applications.

I use Dart for everything: client, server, and command line tools.

The tooling gives you plenty of room to scale. It's also pretty fast, which means you can also do some number-crunching if you want. It's a nice mix of good tooling, terseness, and performance. You can use it for a very wide range of applications.

If all AtS is doing is adding metadata annotations then I'd much rather see those additions in TypeScript and for Angular to co-opt TypeScript.

Yes, AtS only exists because TS doesn't do these things yet.

That's not gonna happen though is it?

It probably will, to some degree. Ideally, ES7 will do all those things and TS and AtS will be put on eternal hold.

Anyhow, before that happens TS and AtS might merge. Personally, I think that would be the best case scenario. We really only need one TS-like language, but it probably should support things like metadata annotations and type introspection, because those features are kinda handy.

0

u/[deleted] Nov 05 '14

[deleted]

2

u/x-skeww Nov 05 '14

As far as I understand it, this stuff is mostly interesting for having some kind of "developer mode".

With Dart, you use the so-called "checked" mode during development. This helps to catch and identify all type-related errors.

With AtS, you could do something similar. You'd generate instrumented JS to make development easier, but you won't ship it like that.