AtScript and generators

145 views
Skip to first unread message

Oran Dennison

unread,
Oct 28, 2014, 9:43:05 PM10/28/14
to ang...@googlegroups.com
I've heard AtScript will be a superset of ES6. I've also heard it will be a superset of TypeScript. It will compile to ES5 using Traceur. It will also optionally compile to Dart.

This leaves me wondering, will AtScript support ES6 generators? If it's a true superset of ES6, then yes, and Traceur supports generators so this seems reasonable. But, TypeScript doesn't support generators yet, and I don't know enough about Dart to guess whether it would support that.

I would love to be able to use generators with AtScript for async/await-style programming as popularized by Koa, Co, Bluebird, and other libraries. Any thoughts or speculation on whether this might be possible?

Sander Elias

unread,
Oct 29, 2014, 12:58:27 AM10/29/14
to ang...@googlegroups.com
Hi Oran,

Where did you hear that? That's not what is being said (yet). It's a very moving target, so, nothing is set in stone yet.
However, MS is moving typescript to support the full scope of ES6. Only if/when this gets done, the angular team will
maybe pick up typescript. If it's not, they will include a typing system in ATscript.

Short answer, Yes, it will be possible.

Regards
Sander

Oran Dennison

unread,
Oct 29, 2014, 1:27:09 AM10/29/14
to ang...@googlegroups.com
There are a number of news articles and blog posts that say these things, but the original source is here, especially from the 27:45 mark onward. See 32:25 for the Traceur-to-ES5 option.
https://m.youtube.com/watch?v=lGdnh8QSPPk

Sander Elias

unread,
Oct 29, 2014, 1:49:52 AM10/29/14
to ang...@googlegroups.com
Hi Oran,

I was there, so I know what has been said ;) I talked with the core team a lot. If you listen closely, is is saying things as 'like TypeScript', and so on. 
However I do get where you got your impression.
Bottom line, they won't use typescript if it does not support the whole of ES6. 

Regards
Sander

Oran Dennison

unread,
Oct 29, 2014, 1:57:53 AM10/29/14
to ang...@googlegroups.com
Ah, that makes more sense.  Although I assumed it wasn't literally built on top of Microsoft's TypeScript implementation because it's using Traceur.  This actually got me quite excited because it makes me hopeful that AtScript might deliver "TypeScript + full ES6" before Microsoft does. I'm not very hopeful about Microsoft's ability to deliver that in a timely manner, but it seems AtScript could get this "for free" today with their use of Traceur.  The only concern is whether they might have to limit themselves to a subset of Traceur's capabilities due to the need to also compile to Dart.

Sander Elias

unread,
Oct 29, 2014, 2:17:30 AM10/29/14
to ang...@googlegroups.com
Hi Oran,

Well, Even if that is the case, it won't concern your code. You are free to use whatever language you are comfortable with, as long as it compiles to es5/es6
So, if you are a big fan of coffee Script, go ahead and use it. If anything else fancy's you, go ahead, you can use it.

For me, I happen to like JavaScript, and I will switch to ES6, when the futures I want to use are available in all evergreen browsers.
In my eye's type-systems are overrated anyway. But that's an entirely different discussion ;)

Regards
Sander

Oran Dennison

unread,
Oct 29, 2014, 2:26:19 AM10/29/14
to ang...@googlegroups.com
Correct, it won't matter whether I use Angular 2.0 with ES5, ES6, TypeScript, AtScript, CoffeeScript, or Dart.

But, I'm very interested in using AtScript for my own code if it gives me generators + types.  Like you, I prioritize the type system lower, so if it comes down to it I will just use "plain old Traceur" and generators, but I keep being tempted by the extra IDE features that light up when types are available.  AtScript seems to be the most likely opportunity to "have it all" within the next 6 to 12 months, hence my excitement.

Sander Elias

unread,
Oct 29, 2014, 2:39:44 AM10/29/14
to ang...@googlegroups.com
Oran,

Yeah, I know. I want it NOW!, but alas, I still have to deliver my code now, and my customers are aren't even close to an blunt edge, let alone the cutting edge! And I can use the full of ES5, There are some of our colleges that still need to do ES3!

Regards
Sander

Sander Elias

unread,
Oct 29, 2014, 2:42:22 AM10/29/14
to ang...@googlegroups.com
Oran,

Oh, BTW, the list of languages that compile to JS is quite a bit longer then just those few ;)
https://github.com/jashkenas/coffeescript/wiki/list-of-languages-that-compile-to-js

Kyle Cordes

unread,
Oct 30, 2014, 10:20:54 AM10/30/14
to ang...@googlegroups.com
It saddens me a bit, that as long as this list is, apparently none of them were sufficient for Angular 2.0's needs.


--
Kyle Cordes

Richard Seldon

unread,
Oct 30, 2014, 10:35:41 AM10/30/14
to ang...@googlegroups.com
Hi Kyle,

AtScript is NOT about building a new language. 

Miško Hevery does address this concern right away in his Keynote on AtScript at ng-europe 2014:


It is more an attempt to predict and create the future direction for JS (using "proven concepts and syntax" from Dart, TypeScript, and ES6).

The goal is extend existing JS so we can build even better apps, but also support current eco-systems. 

The type system argument is mostly around scalability…  yeah, not my favourite aspect of what is being proposed but reluctantly do see the benefits (especially around tooling and reading others code).

Best regards,

Richard.



--
You received this message because you are subscribed to the Google Groups "AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email to angular+u...@googlegroups.com.
To post to this group, send email to ang...@googlegroups.com.
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Sander Elias

unread,
Oct 30, 2014, 10:40:27 AM10/30/14
to ang...@googlegroups.com
Hi Kyle,

Don't be sad.
The main reason they did not pick any of those, is that they all stray (more or less) away from JavaScript.
As Misko said it, they are NOT making a new language. They are just adding a few extension to JS. And probably 
those extensions will probably end up in the language anyway.

Regards
Sander

Kyle Cordes

unread,
Oct 30, 2014, 12:27:19 PM10/30/14
to ang...@googlegroups.com
On Thu, Oct 30, 2014 at 9:35 AM, Richard Seldon <arcs...@gmail.com> wrote:
Hi Kyle,

AtScript is NOT about building a new language. 

Miško Hevery does address this concern right away in his Keynote on AtScript at ng-europe 2014:


It is more an attempt to predict and create the future direction for JS (using "proven concepts and syntax" from Dart, TypeScript, and ES6).

The goal is extend existing JS so we can build even better apps, but also support current eco-systems. 


It is yet another new extension/variation of JavaScript. Perhaps with ideas that might end up in a future ESn. See below about the human language we used to talk about computer languages.
I am not sad; and I have looked at numerous built-over-JS languages. Many are wildly different than JS (like one I use, ClojureScript). Many, many others are extensions/supersets of JS. I am not picky about the language used to described these maybe-languages; but this is "not a new language" in the same sense that 100 others on that list are not a new language. I've been describing both types as "new language".

I like these extensions, I am just disappointed that none of the highly numerous other extensions was good enough to adopt.

Sander Elias

unread,
Oct 30, 2014, 12:49:24 PM10/30/14
to ang...@googlegroups.com
Hi Kyle,

I get your sentiment. It is indeed sad that none of those languages added support for annotations and/or introspections. 
Types are more or less solved in a couple of them.
However, I'm glad they decided to go this direction. It will not force any of us to use an language you do not want.
I do like the stuff that will be available in AtScript, and I would be more then happy to use it. Well, once the run-time
library for tracuer is less demanding/not needed anymore.

Regards
Sander
Reply all
Reply to author
Forward
0 new messages