[Offtopic] Typescript - more statically typed Javascript, this time from Microsoft

43 views
Skip to first unread message

Ben Hutchison

unread,
May 6, 2013, 3:21:29 AM5/6/13
to scala...@googlegroups.com
At a Yow night last year, Brian McKenna gave a demo of Roy, his
experimental, Haskell-inspired, statically typed language that
compiles down to Javascript [http://roy.brianmckenna.org/].

From reading Brian's blog, I became aware of another recent (and
probably better resourced) attempt at a typed Javascript: Typescript
from Microsoft [http://www.typescriptlang.org/].

How it compares to Google's Dart is an interesting question. I don't
understand the differences well enough to comment yet.

..but I'm glad to see increasing time and effort being put into static
typing on the client-side.

-Ben

Travis Dixon

unread,
May 6, 2013, 3:38:07 AM5/6/13
to scala...@googlegroups.com

There was a presentation on it at web directions.

Looked a bit like java in the slides but I am told it can do inference and function types which is good

Microsoft product but has a sublime plugin and works on linux

--
You received this message because you are subscribed to the Google Groups "Melbourne Scala User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to scala-melb+...@googlegroups.com.
To post to this group, send an email to scala...@googlegroups.com.
Visit this group at http://groups.google.com/group/scala-melb?hl=en-GB.
For more options, visit https://groups.google.com/groups/opt_out.


Andrew Browne

unread,
May 6, 2013, 4:04:34 AM5/6/13
to scala...@googlegroups.com
Typescript looks like its off to a nice start. We are considering using it at work.

The properties that I really like:
  1. Superset of javascript so all javascript is valid typescript. Makes interop a non-issue.
  2. The mapping of typescript to javascript is quite transparent so debugging in javascript looks like it won't be a big problem.
  3. Allows you to create strongly type interface to existing libraries. This has been done for many already: https://github.com/borisyankov/DefinitelyTyped
  4. It's missing generics right now but it seems they are coming by 1.0.
  5. Some type inference.
cheers
Andrew

Ben Hutchison

unread,
May 8, 2013, 11:23:55 PM5/8/13
to scala...@googlegroups.com
Like Dart it seems Typescript has traded-off type soundness in order
to avoid exposing the concept of Variance to programmers:

http://typescript.codeplex.com/discussions/428572

Not a fan of that decision in either case, myself. I appreciate
Scala's honesty with regards to variance.

I note that C# 4.0 has introduced explicit, definition-site variance
as well: http://msdn.microsoft.com/en-us/library/dd997386.aspx

-Ben
Reply all
Reply to author
Forward
0 new messages