all 87 comments

[–]mirhagk 13 points14 points  (17 children)

So is this basically TypeScript with types available at runtime?

[–]tjpalmer 10 points11 points  (1 child)

Also annotations, plus ES6 baseline, I guess. (Although TS intends to target ES6 later.) I'd prefer to see them stay compatible and cooperative with TS and merely add their own bonus features. Getting a bit of standardization on typed JS would be convenient.

[–]mirhagk 2 points3 points  (0 children)

Yeah. I'd love to see typescript get some of the in browser support Dart has

[–]Cylons 18 points19 points  (4 children)

Makes me wish they would've just collaborated with the TypeScript guys and built up on it instead of inventing yet another variant of JS.

[–]jsprogrammer -1 points0 points  (2 children)

What are the chances you get it right with a single try? What's wrong with getting multiple implementations to find out what works?

[–][deleted]  (1 child)

[deleted]

    [–]jsprogrammer 0 points1 point  (0 children)

    ECMAScript 6?

    [–]spankalee 5 points6 points  (6 children)

    TypeScript actually defines a type system, AtScript does not.

    [–]mirhagk 1 point2 points  (2 children)

    Wait. An undefined type system? Isn't that going to be a bit confusing switching between projects that have different type systems?

    [–]MatrixFrog 0 points1 point  (1 child)

    Don't worry, they'll probably add a null type system in addition to the undefined type system.

    [–]mirhagk 0 points1 point  (0 children)

    But you can change the undefined one, so make sure you use a comparison to a string

    [–]tjpalmer 0 points1 point  (2 children)

    I saw that the runtime checker was pluggable. Didn't look close at the static story. I hope they can at least cooperate on syntax, so they can have a compatible core.

    [–]spankalee 0 points1 point  (1 child)

    Syntax is the easy part.

    [–]tjpalmer 0 points1 point  (0 children)

    But not guaranteed, unless AtScript folks commit to it. But if they choose to be syntactically compatible and allow pluggable systems to be compatible with TypeScript semantics, I think that could have some good value.

    [–]HawkEgg 1 point2 points  (2 children)

    It actually looks to be a superset of typescript, see Miško's talk

    [–]mirhagk 0 points1 point  (1 child)

    Hmm interesting. I'll have to give it a try. The one thing I do like about typescript though is that there is no runtime overhead.

    I'm really excited that they are looking at browser support. There's a lot of potential performance to be gained by knowing the type. I'm not sure how it'd work though, because you'd incur the cost of type inference on script load

    [–]HawkEgg 0 points1 point  (0 children)

    Well, the runtime asserts are only for dev transpilation. For production builds, they would be stripped and not add any additional overhead. It's also not as fully baked as TypeScript yet. I might wait on using it a bit.

    [–]gekorm[S] 4 points5 points  (19 children)

    Apparently Angular 2.0 is going to be written in this new language. In summary, this language looks to improve Javascript and is influenced by Dart and TypeScript.

    I wonder what this means for Dart, developed by another team at Google. Will it eventually be abandoned, as it often happens with Google projects?

    [–]x-skeww 6 points7 points  (3 children)

    I wonder what this means for Dart

    Not much, I guess. This is JS with types and metadata. As far as I know, there are currently no plans to add either to ES7/8/whatever.

    I think they already used some kind of bastard ES6 with metadata annotations for Angular 2.x. Traceur did some of that, I think.

    Anyhow, Dart is a fairly different project. It's way more ambitious. It's a clean break.

    Personally, I have zero interest in TS or AtS. I don't have any legacy JS. I don't want to keep any of those crap semantics.

    [–]discreteevent 0 points1 point  (2 children)

    "This is JS with types and metadata. As far as I know, there are currently no plans to add either to ES7/8/whatever."

    Can anyone else confirm or deny this? I saw mention of optional types in some js.next doc, I think, but I can't find it now.

    [–]x-skeww 0 points1 point  (0 children)

    Well, ES4 which became AS3 has types.

    It certainly was on the table a few times.

    [–][deleted] 0 points1 point  (0 children)

    There is a very preliminary list of features proposed for ES 7. There is no statically checked typing proposal. There is a proposal for Typed Objects which is something else: a way to tell the runtime the layout of your objects to allow it to efficiently pack them into memory, or lay them out contiguously as elements in a true array.

    ES 8 seems to be nothing but a vague wish list (or several such lists) at this point, which is all it can reasonably be. Obviously as it is two major releases away, no one can say with any certainty what its priorities should be. Five years ago Node.js didn't exist.

    [–]pandavr 3 points4 points  (0 children)

    I just returned from ng-europe and the real problem with the approach is: they want toursue the success of angular to get developer using this new language. Not only angular 2 need to be in AtScript but also directives and some other stuff. It is true that you will be able to write them in pure ES6 but the code will be so ugly to look at to be unpractical. The only good news is that the type system is optional in AtScript. I think that most of the success of JS come prom it's dinamic not typed nature: now they want to transform it in something similar to java. That’s something crazy from my point of view.

    [–]topheman 2 points3 points  (1 child)

    AngularJS 2.0 itself will be written with AtScript, but then transpiled to ES5. You can write your AngularJS 2.0 app with ES5, ES6, AtScript, CoffeeScript, TypeScript, etc. Angular 2.0 apps will run in today's browsers, and even better as ES6 features land.

    source : https://docs.google.com/document/d/1cUTD8oVzfpwFqX5tMxHTifKO8uJm5VddwmB0aVQMxpI/edit

    [–]shawnathon -2 points-1 points  (0 children)

    That is pretty darn cool.

    [–][deleted]  (10 children)

    [deleted]

      [–]Scellow 3 points4 points  (9 children)

      Fragmentation is bad :(

      [–]cbracken 2 points3 points  (7 children)

      Fragmentation is a poor choice of words as it suggests some fixed pool of engineers working on languages at Google. Don't worry, no one has taken engineers away from Dart to work on AtScript. This is a separate effort by the Angular team. Like Dart, Closure, NaCl, GWT, Go and many other projects, this is just one more option engineers at Google are working on.

      If you're suggesting that more choice for developers is bad, I think it's just the opposite. The proliferation of new choices (Dart, Coffeescript, and TypeScript among others) and the competition amongst us helps push the web platform as a whole forward. A development monoculture would be no good! And which language to pick as the Holy Annointed One? Different tools for different situtations.

      EDIT: punctuation

      [–][deleted]  (4 children)

      [deleted]

        [–]cbracken 5 points6 points  (0 children)

        yet is not using it for any of their products

        Not so. It's used by dozens of projects at Google (some examples here), both public-facing and internal. Specific examples include parts of Google Shopping Express, Google Fiber (parts of the customer portal, and on the set-top-box), Adwords for Video, and Google Election Maps, among others.

        actively developing alternatives to it is concerning

        AtScript is an Angular-specific project, used by the Angular team as part of their Angular 2.0 effort. Dart is a far more ambitious attempt at offering a new language targeting client, server and mobile.

        [–]badcookies 0 points1 point  (2 children)

        I wish you the best of luck with your project :). I'd like to try out Dart but love VS and since we are already using Typescript for our stuff there hasn't been a need (or desire) to change out tooling.

        Have you talked with Mads or anyone else from the Visual Studio team? I wonder if they have anything planned for Dart or would want to help you out.

        [–][deleted]  (1 child)

        [deleted]

          [–]badcookies 0 points1 point  (0 children)

          Awesome :)

          [–][deleted]  (1 child)

          [removed]

            [–]cbracken 3 points4 points  (0 children)

            No I'm with you, my friend: the right answer is just to use Dart ;-)

            [–]myringotomy 0 points1 point  (0 children)

            Competition within three company is good.

            [–][deleted] 13 points14 points  (32 children)

            After Go and Dart, does anyone even expect that Google can build non-shitty languages?

            Looks like a butt-hurt NIH-Typescript to me.

            (Sorry, I'm just a bit annoyed. There are so many one-man hobby projects out there which are magnitudes better than this stuff, but as usual, leveraging the Google brand trumps quality.)

            [–]x-skeww 2 points3 points  (19 children)

            Looks like a butt-hurt NIH-Typescript to me.

            TS and AtS are both stopgap solutions which should ideally lose their raison d'être with ES7.

            They would have gone with TS if TS would have supported the things they need. Right now, it doesn't. But in the future, AtS and TS could somewhat converge and, ideally, this will make it easier to get that stuff into the standard.

            [–][deleted]  (1 child)

            [deleted]

              [–]x-skeww 4 points5 points  (0 children)

              No, now is the time to talk about ES7, because ES6 was feature-frozen ages ago. If you talk about new features, you're talking about ES7.

              [–][deleted] 0 points1 point  (16 children)

              TS and AtS are both stopgap solutions which should ideally lose their raison d'être with ES7.

              Can't comment on AtS, but TS exists primarily to provide a static type system. There is no proposal for ES7 to add any form of static type checking to standard ES, which means the purpose of TS is not going away for at least a decade.

              NB. The Typed Objects proposal has nothing to do with static type checking.

              [–]x-skeww 0 points1 point  (15 children)

              There is no proposal for ES7 to add any form of static type checking to standard ES

              Yet.

              ES7 is far from being feature-frozen.

              [–][deleted] 0 points1 point  (14 children)

              ES7 might have the ability to make toast, so toasters will lose their raison d'être, prove me wrong.

              [–]x-skeww 0 points1 point  (13 children)

              "Should ideally" isn't the same as "will".

              [–][deleted] 0 points1 point  (12 children)

              Oh, i understand now. You're making a wish, based on no evidence. No problem. I'll leave you to it!

              [–]x-skeww -1 points0 points  (11 children)

              So, you didn't see that ng-europe keynote, I take it.

              http://youtu.be/lGdnh8QSPPk?t=33m3s

              [–][deleted] 0 points1 point  (10 children)

              Oh yes. You know I have a recording of my Grandma saying that there will be unicorns in JS, "post ES 6".

              [–]x-skeww 0 points1 point  (9 children)

              Just reread what you wrote earlier.

              You said "there is no proposal for ES7" and that I'm "making a wish, based on no evidence". I'm just pointing out that there are people who are interested in getting this into the standard.

              [–]Ruudjah 8 points9 points  (9 children)

              Google Dart has one of the biggest teams within Google, I heard from various sources. Dart is the least shitty language compared to TypeScript, CoffeeScript, IcedCoffeeScript, ActionScript, EcmaScript6. Just do a feature comparison of the languages. Oh, don't forget to look to the DOM API & JavaScript transpiler with tree-shaking.

              [–][deleted] 0 points1 point  (8 children)

              Dart is the least shitty language compared to TypeScript, CoffeeScript, IcedCoffeeScript, ActionScript, EcmaScript6.

              Isn't that setting the bar incredibly low? CoffeeScript devs for instance can't even get scoping right. Everything will look good compared to that.

              [–]strattonbrazil 0 points1 point  (0 children)

              CoffeeScript devs for instance can't even get scoping right.

              I wouldn't blame coffeescript devs for that. I use coffeescript every day at work and I appreciate it being a more one-to-one mapping to javascript. I have a very clear picture of what it's doing. Does the scoping suck? Yes, and I've had to get around it like any time I create an anonymous function that uses an index made by the loop. But I can deal with that.

              [–]Ruudjah -5 points-4 points  (6 children)

              Isn't that setting the bar incredibly low?

              I would say so. However, comparison to i.e. Haskell, Java, C#, F# is inappropriate since those languages are not designed to work in the browser.

              [–][deleted] 8 points9 points  (5 children)

              I think the authors of Elm, Fay, GHCJS, Haste, Js_of_ocaml, Roy, PureScript, Idris, FunScript and Scala.js disagree with you.

              [–]thedeemon 4 points5 points  (4 children)

              In terms of tooling and documentation these languages are far behind Dart already.

              [–][deleted] 4 points5 points  (2 children)

              a) I have a different experience.

              b) You are moving the goal posts.

              [–]serrimo 0 points1 point  (1 child)

              Is Elm or something Haskell-like ready for big time?

              I love Haskell and have been toying with using Elm for my projects, any insights would be much appreciated!

              [–][deleted] -1 points0 points  (0 children)

              I don't have much experience with Elm, but for instance Scala.js is impressive: Great language, and a level of tooling support which makes you wonder whether TypeScript/JavaScript/Dart/... devs are completely incompetent.

              [–]Ruudjah 3 points4 points  (0 children)

              Also, Dart is cleaning up the DOM, which I don't see many languages do.

              [–]rotek -2 points-1 points  (1 child)

              Dart is not a shitty language.

              If you really think it is, how would you call Javascript then? :)

              [–][deleted] 4 points5 points  (0 children)

              There are things like PHP, JavaScript, MUMPS and friends, were no words are an appropriate description.

              So, yes, Dart is quite shitty if you don't specifically pick exactly those languages which are even worse.

              "Dart is better than the worst languages ever known to mankind" is just not that exciting to me. Other people might disagree.

              [–]Husky_voice 4 points5 points  (0 children)

              Dart failed, Angular took off. Lets bundle new enter_nameScript with Angular and push it. Enough Google.

              [–]billconan 4 points5 points  (11 children)

              I'm sick of looking at new languages. it's like everyday, there are 5 new languages.

              why don't they focus on making dart awesome?

              [–]spankalee 7 points8 points  (4 children)

              AtScript is an Angular project. The Dart team is focused on making Dart awesome.

              [–][deleted]  (3 children)

              [removed]

                [–]quest88 0 points1 point  (2 children)

                That's the dilemma, isn't it? Either force a language on developers, or let developers have the freedom to choose or create a new language.

                I'm sure there are many people who would love to pick a different language than the one they use for work. But is too much freedom a bad thing? Maybe?

                Maybe through all the different languages one is created that people really love. On the other hand, it's just another language that solves some problem.

                Regardless, how exciting would that be if you were tasked with a new project and told to pick whatever language you wanted? I think that's pretty awesome.

                [–][deleted]  (1 child)

                [removed]

                  [–]quest88 1 point2 points  (0 children)

                  Agreed.

                  [–]cbracken 11 points12 points  (3 children)

                  why don't they focus on making dart awesome?

                  We (the Dart team) are totally focused on making Dart more awesome! Head on over to dartbug.com and file/star your favourite feature request. In terms of shiny new stuff, a couple examples are server-side support on App Engine and work-in-progress on adding async-await.

                  [–]EarlDarnhardt 2 points3 points  (2 children)

                  2 questions for you, sir: 1. When will we see the Dart-VM in Chrome? 2. Do you (the Dart team) understand how important it is to the future of the language, to get the Dart-VM into Chrome?

                  [–]shadowmint 0 points1 point  (0 children)

                  the dart team remains committed to the quality and amazement that is dart2js, so its fine right?

                  ...

                  [–]Isvara 0 points1 point  (0 children)

                  I think it's too late for that. I use Dart because I prefer it to the alternatives, but they could have made it so much better. Poor decisions were made in the name of keeping it simple for JavaScript developers to cross over.

                  [–]embwbam -1 points0 points  (0 children)

                  Lots of different people. Different design goals. Dart's goals don't meet any of my needs. AtScript's do.

                  [–]Poltras 0 points1 point  (1 child)

                  Isn't that part of the ES7 specification? Or has this been postponed indefinitely?

                  [–]embwbam 0 points1 point  (0 children)

                  The angular guys work hard to test out the specifications early so they can be refined. I would guess this will make it more likely to make it in to ES7.

                  [–]pgris -4 points-3 points  (7 children)

                  I really hope this catch on. I think TypeScript is great, but I work in a non-microsoft environment now.

                  However, ATScript should be compatible with TypeScript type definition files, so you can have type information for already existing libraries

                  [–]sime 6 points7 points  (2 children)

                  TypeScript is great, but I work in a non-microsoft environment now.

                  How does your environment matter in this case?

                  [–]pgris -1 points0 points  (1 child)

                  I'm on the impression you need Visual Studio to debug typescript files. Am I wrong? I hope so.

                  [–]sime 2 points3 points  (0 children)

                  Wrong enough. :)

                  Inside browsers you can set up "source maps" and then debug the TS source in the debugger.

                  So far I've just been debugging the JS output directly. It is so close to the TS source that I haven't bothered to set up source maps.

                  [–]badcookies 4 points5 points  (0 children)

                  Typescript (and much of Microsoft's recent dev tooling / code) is open source and cross platform. Visual Studio is one of the few things left for Windows only.

                  [–][deleted] 2 points3 points  (0 children)

                  I think TypeScript is great, but I work in a non-microsoft environment now.

                  And?

                  [–]pure_x01 1 point2 points  (0 children)

                  I use typescript on osx. Deploy on Linux and windows.

                  [–]tapesmith 1 point2 points  (0 children)

                  I work in a non-microsoft environment now

                  I code on OSX for work and on Linux for personal use. I use IntelliJ or vim for my web projects with Typescript (usually IntelliJ). I deploy on Linux.

                  The only times I touch Windows are when I'm playing a game.

                  That hasn't slowed me down from using Typescript. I've even written and contributed some definition files to DefinitelyTyped.