Building a new language might be tempting, but you could make a whole new set of mistakes, people would have to learn something new,… The XKCD comic on standards was in one of the slides:
Misko also mentioned annotations and introspection.
Annotations can communicate intentions by specifying the type of a field or parameter.
These annotations are available at runtime and this is where introspection comes into play.
And that is what AtScript is: optional types, annotations and introspection.
It is a run-time type system. This means that types are checked at runtime. Your code is compiled to assertions (for example, asserting that a parameter is of a certain type). AtScript can handle
- nominal assertions (i.e. it’s an array)
- structural assertions (i.e. a given string matches a certain regex)
An example Misko mentioned, is that this means it’s possible to check the server JSON response for the correct type.
The next steps are static type checking, alignment with TypeScript, an ECMAScript proposal, browser support and finally an ECMA standard.
I don’t expect to use this in the near future, but it is nice to know what’s coming.
Check out all the slides here.