Coffeehouse Thread

113 posts

TypeScript is JavaScript...

Back to Forum: Coffeehouse
  • User profile image
    Ray7

    , petr.antos wrote

    Ray7: tsc can simply compile itself to JS file, so you can use it as embedded scripting precompiler, which exposes everything useful for you too, types "reflections", refactorings, code analysis, syntax coloring, etc ... its pure-JS, thats the trick Smiley, no VS needed, no node.js needed ...........

    That is ... GENIUS! Scared

     

     

  • User profile image
    Ray7

    , petr.antos wrote

    Ray7: and as probably biggest TS project now, tsc source code in few .ts files is really very good start to analyze tooling features support using VS2012 plugin, to try to understand how it works. Already this is pure beauty, you have open compiler interface at aour fingertips, you can skip to definitions, find references, simply everything you do to figure out how yet unknown code works; so good to learn how much MS eats own dog food (not foot:-)) here Smiley

    I think the big win here is the compiling compiler. And I think MS clearly recognises that they'll get much more traction by extending Javascript rather than writing a new language. 

     

  • User profile image
    niutech

    Hi folks!


    I'd like to announce that I've just made TypeScript Compile, a client-side script which compiles your TypeScript into JavaScript on the fly. No need for tsc, node.js or VS. Just write your TC code in <script> just like JS and include TypeScript Compile. The code will compile and run automatically.

    Please tell me what you think about it and fork the code if you'd like to improve it.

  • User profile image
    Ray7

    , Sven Groot wrote

    *snip*

    I'm not sure if this is the case, but if they aim to be a compatible superset of JavaScript (and from the renaming stuff Herbie has been mentioning it sounds like they do) that would break any regular JavaScript code that happens to include stuff like that in a string.

     

    Now I think about it, it would be just as easy to come up with a String function that does the same thing.

  • User profile image
    Ray7

    , magicalclick wrote

    @Ray7:

    Have you watched the C9 video yet? Because that explained about everything. For example, the new constructor is mapped to the JS pattern that defines constructor. If you don't want to do that, you can use method for that. But you need to think about Type. Meaning, you can pass in a Object that has specific student attributes, but, you cannot say obj.SetSrudentAttrributes().

    You don't need to rewrite the source, but, you need to give a type declaration xx.d.ts file. So TS would know know it is not ANY yet. If you pass in pure JS, the type is ANY, which I dont know how the IDE deal with it. Probably in the same video that I need to rewatch.

    Yes, I think I have this rather set idea about dynamic languages: objects should just be THERE, sort of a thing. But of course, once you start adding types then all bets are off really. 

  • User profile image
    fanbaby

    , kettch wrote

    @DeathByVisualStudio: They are the most upfront about what they are doing. Companies like Google and Apple seem to be hiding behind the FOSS banner and using it for their own purposes, but don't seem to give back as much as they take.

    Microsoft doesn't use any FOSS in their products, but gives a whole lot to the community. They aren't even pushing their own branded licenses any more and are instead using licenses that are more palatable to the FOSS fanbois.

    I understand your point about Google and Apple just using OS contributors, while Microsoft is at least being honest. Don't agree tough.

    I am more interested to understand someone who DOESN'T see him/herself as a "FOSS fanboi". How does that work? On the face of it it looks like this: "Hey, here's a small jewel for you, it's yours, it's free! No thanks, i'll wait when it'll be available at the store".

  • User profile image
    Dr Herbie

    @fanbaby: Part of the problem (in my experience) is quality control -- taking a 'jewel' from someone you don't know might well turn out to be made of paste, or even worse contain arsenic that poisons everything.

    At least if a big company releases something open you can have a higher level of confidence that the quality will be good without having to spend the time performing your own quality control.

    Additionally, larger companies tend not to use the latest GPL which I have come to dislike for being too dictatorial (and therefore less 'free', ironically).

    Herbie

  • User profile image
    Ray7

    , Dr Herbie wrote

    @fanbaby: Part of the problem (in my experience) is quality control -- taking a 'jewel' from someone you don't know might well turn out to be made of paste, or even worse contain arsenic that poisons everything.

    At least if a big company releases something open you can have a higher level of confidence that the quality will be good without having to spend the time performing your own quality control.

    Additionally, larger companies tend not to use the latest GPL which I have come to dislike for being too dictatorial (and therefore less 'free', ironically).

    Herbie

    I've rarely had a problem with the quality of an OSS product; the issue is usually that the project gets abandoned.

    But this can happen with commercial software, so ...

    With someone like Microsoft running this, you can guarantee that the whole shooting match will be well documented, something that OS often lacks.

     

  • User profile image
    evildictait​or

    I've rarely had a problem with the quality of an OSS product; the issue is usually that the project gets abandoned.

    But this can happen with commercial software, so ...

    Yes, but if you're paying a company money, you have some kind of recourse on them to ensure that they patch their product and continue to support it whilst you keep paying.

    Joe-in-his-bedroom has no real incentive to produce high-quality code, or to provide prompt patches or to support your product beyond a few weeks after it becomes business critical to your company.

     

    Case in point: IE6 might be possibly the worst invention since sliced-bread, but it was absolutely business critical to a ton of organisations. It was supported by Microsoft for a full 10 years whilst they had 3 newer major versions available. Microsoft would still patch IE6 for critical updates long after Microsoft was actively telling customers not to use it.

    The upshot of this was that companies for whom IE6 was critical, didn't have to fight the ideology of companies like Google who silently update, remove features, swap things around and generally play shenanigans with any business's attempt to script the browser or bundle it into business critical apps.

    So yes, Chrome might be great for normal home-users, but it (and FOSS projects like it) are never going to be loved by enterprise in the way that IE is loved, because enterprise wants programs to be supported and reliable for as long as at all possible. Whereas FOSS developer like to change things, give users (rather than administrators) lots of customisations, like to support only the most recent version, and like having seamless, non-optional updates that make it incredibly difficult for large organisations to deploy.

    FOSS is great for home, but it really sucks for companies.

  • User profile image
    AndyC

    @evildictaitor: Very true. But even with projects from Google, the king of abandonware, enterprises are more inclined to have trust in a product because there is at least somewhere they can go and offer money to get a fix if they get desperate. And there's likely to be more than one guy working on fixing critical bugs. You just don't get that level of confidence when it's a project mostly driven by one individual, which the majority of FOSS projects are.

  • User profile image
    Bass

    @AndyC:

    That's the thing, because it is open source it's much easier to offer money to get a fix because you have options. Hell, you can fix it yourself!

    If the software is proprietary, good luck with that. The proprietary originator might have even went bankrupt and the source code lost in the chaos. Hell, the whole idea that you'd trust parts of your critical business systems to a random external vendor with different business interests is crazy.

    Actually, this exact reason is why many of the larger organizations use FOSS over proprietary software these days. FOSS gives a piece of mind that is impossible with proprietary software.

  • User profile image
    Bass

    @kettch:

    The idea that Microsoft doesn't use FOSS is strictly incorrect. In fact jQuery is bundled with ASP.NET MVC these days. Obviously they use Git and Mercurial source control too. This is all stuff that is publicly known, there also evidence (copyright strings, etc.) that Windows had BSD code in for awhile, and some evidence that Microsoft used Hadoop/HBase in Bing at some point (well, PowerSet was, which was bought by Microsoft - I highly doubt they threw away all of PowerSet's code on the day they acquired them).

    But the thing is, it doesn't matter. You aren't a better FOSS contributor if you avoid using it. Really, the whole contention is silly.

  • User profile image
    kettch

    @Bass: I don't buy that arguement that because it's FOSS that you can fix it yourself. That is still just as useless as a proprietary product, perhaps even worse in some ways.

  • User profile image
    cbae

    , Bass wrote

    *snip*

    FOSS gives a piece of mind that is impossible with proprietary software.

    I didn't picture you as an Iron Maiden fan.

  • User profile image
    Ray7

    , Bass wrote

    @AndyC:

    That's the thing, because it is open source it's much easier to offer money to get a fix because you have options. Hell, you can fix it yourself!

    That may be true in theory, but how many people can actually fix a bug they found in Linux, or MySQL? Very few.

    If the software is proprietary, good luck with that. The proprietary originator might have even went bankrupt and the source code lost in the chaos. Hell, the whole idea that you'd trust parts of your critical business systems to a random external vendor with different business interests is crazy.

    And open source projects can be abandoned with the business user left with a million lines of source code and no idea what to do with it.

    Actually, this exact reason is why many of the larger organizations use FOSS over proprietary software these days. FOSS gives a piece of mind that is impossible with proprietary software.

    The reason that many large organisations use FOSS over proprietary software is that they don't have to pay for it. Idealism rarely has anything to do with it.

  • User profile image
    Ray7

    But the thing is, it doesn't matter. You aren't a better FOSS contributor if you avoid using it. Really, the whole contention is silly.

     

    Yes, the logic of that blew right past me ...

    Expressionless

  • User profile image
    kettch

    @Ray7: What I meant was that they weren't taking and not giving back. In fact, they give more to open source than they use. Many companies use FOSS as a way to get a leg up and give back only the minimum.

  • User profile image
    figuerres

    , Bass wrote

    That's the thing, because it is open source it's much easier to offer money to get a fix because you have options. Hell, you can fix it yourself!

    If the software is proprietary, good luck with that. The proprietary originator might have even went bankrupt and the source code lost in the chaos. Hell, the whole idea that you'd trust parts of your critical business systems to a random external vendor with different business interests is crazy.

    Actually, this exact reason is why many of the larger organizations use FOSS over proprietary software these days. FOSS gives a piece of mind that is impossible with proprietary software.

    normal "users" do not write software and would not have a clue how to even start to "fix" a program.

    and who do you pay ?  if the project has say 12 folks who work on it who do you pay them ? and who do you talk to ? really ...

    sure things like a business going under happen... but i can't even count how many times i used to deal with folks in the open source world who were no help at all / had attitudes that stunk etc...

    there are for sure a lot of good folks out there who are helpfull but it's a mixed bag. 

     

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.