Coffeehouse Thread

113 posts

TypeScript is JavaScript...

Back to Forum: Coffeehouse
  • User profile image
    AndyC

    , fanbaby wrote

    So today Microsoft added yet ANOTHER transpiler. Great. News at 9. You see, in this new world, the fact that it's Microsoft, or Google, or Apple or anyone, means nothing.

    LOL, only in fanboy dreams. FOSS projects without substantial backing are high risk options and always will be. Nobody wants to bet heavily on something that disappears overnight because the kid responsible for it got a real job/bored/went to college etc.

  • User profile image
    kettch

    It looks like something significant to the way they've implemented this is that they are keeping it compatible with ECMAScript 6. So, at some point, TypeScript may just simply be ECMAScript. They'll probably continue to add to what they support, but this is a good start.

  • User profile image
    itsnotabug

    I like what I'm seeing! If nothing else, this could be a great test bed/proving ground for the features MS wants in ECMAScript 6.

    The holy grail for me would be to get optional end-to-end data binding of the entire view including 1 > M relationships in the client to/from the web server via command scaffolding. This looks 1 step closer in that direction.

  • User profile image
    evildictait​or

    ... or doing silly things like adding static typing ...

    Don't make me come over there!

  • User profile image
    evildictait​or

    ...but what's your take on Microsoft calming Linux infringes on 287 or so of their patents??...

    I wouldn't get your hopes up. Employees with their Microsoft hat on are usually not silly enough to venture close to the legal pit of death that questions like that might send them spiraling into.

  • User profile image
    magicalclick

    @felix9:

    I would call it JS+1. Because it is using JS as IL and one level on top of the IL.

    Leaving WM on 5/2018 if no apps, no dedicated billboards where I drive, no Store name.
    Last modified
  • User profile image
    Bass

    @evildictaitor:

    Go back to your FORTRAN coding grandpa.

  • User profile image
    JoshRoss

    Two questions.

    1) Where do I go to get up-to-date d.ts files? Like jquery.d.ts? Is there a repository?

    2) Is there actual documentation? Or do I just get a bunch of samples and a playground?

    Right now I am getting lots of "The property X does not exist on the value of type Y." errors, and I don't see an obvious fix.

    -Josh

  • User profile image
    Bass

    @JoshRoss:

    The obvious fix would be to disable "type" checking in the compiler. I notice that in their playground, "type" mismatches only produce warnings, so I assume it is possible. Smiley

  • User profile image
    JoshRoss

    @Bass: Almost the entire purpose of this is for type checking, why would I turn it off? I can add properties to interfaces, that I create, and that seems to clear that type of error.

    And interfaces don't seem to collide with each other. I guess they are just merged some how. Last in wins?

    -Josh

  • User profile image
    evildictait​or

    , Bass wrote

    @evildictaitor:

    Go back to your FORTRAN coding grandpa.

    Any time you save by not typing out types is more than made up hunting bugs that would trigger compile-time errors in any good language.

    Case in point: When did you last reuse code? How many JavaScript libraries have you made? When you start a new webpage, how much time do you spend writing code you've already written before? When was the last time you got to debug an exception that happened on a customer's machine or step through your code?

    I'll stick with my FORTRAN. It's got way better features than your JavaScript does.

  • User profile image
    Bass

    @JoshRoss:

    Because it is unnecessary.

    @evildictaitor:

    Obviously what we need is a FORTRAN to JS compiler.

  • User profile image
    evildictait​or

    Obviously what we need is a FORTRAN to JS compiler.

    Then at least Javascript would have types.

    And there we are. Full circle.

  • User profile image
    cbae

    I remember FoxPro had dynamic typing, but people treated that language like a redheaded stepchild.

  • User profile image
    JoshRoss

    @Bass: Do you turn off your static analyzers because they are unnecessary? Or check-in comments? Who needs code reviewers? All completely unnecessary!

    -Josh

  • User profile image
    cbae

    @JoshRoss: IIRC, Bass even stated that he thinks comments in source code to be unnecessary.

  • User profile image
    Bass

    @evildictaitor:

    JavaScript has types.

    @JoshRoss:

    If there is a demonstrable benefit, sometimes it can be worth doing unnecessary things. But you shouldn't do something without a knowable benefit. Unless you are a religious man, of course.

    @cbae:

    Correct sans for the qualifier "he thinks". Comments are always unnecessary, regardless of "he thinks" or "X think(s)", because by definition they are ignored by the compiler.

  • User profile image
    cbae

    @Bass: Why would "he thinks" make my statement incorrect unless you're incapable of thinking?

Comments closed

Comments have been closed since this content was published more than 30 days ago, but if you'd like to continue the conversation, please create a new thread in our Forums, or Contact Us and let us know.