back to article Microsoft releases JavaScript alternative

Microsoft has released a new JavaScript development environment, dubbed TypeScript, and says it is designed to help developers write more complex apps with the popular scripting language. Long-time Reg readers may recall that Microsoft has form giving the world new technologies, but not always for altruistic reasons. During its …

COMMENTS

This topic is closed for new posts.

Page:

What...

.... could possibly go wrong?

21
0
Silver badge
FAIL

Re: What...

on the Reg, it's more like "what could possibly go right?"

Reaction to TypeScript on the web - 95% positive.

Reaction to TypeScript on the Reg - 95% hate.

It's Microsoft, therefore it's foul and evil and wicked it makes us feel all k3wl and ub4r to hate on it?

Pathetic.

9
27

Re: What...

"Reaction to TypeScript on the web - 95% positive.

Reaction to TypeScript on the Reg - 95% hate.

It's Microsoft, therefore it's foul and evil and wicked it makes us feel all k3wl and ub4r to hate on it?

Pathetic."

Telegram for Mr.Kettle from Mrs.Pot.

15
3

This post has been deleted by its author

Silver badge
WTF?

Re: What...

Telegram for Mr.Kettle from Mrs.Pot.

Please explain? I tried TypeScript and took a good look at what it is and what it does last night (because a large part of the architecture I'm working on at the moment requires Javascript and it'd be nice if it were more managable).

Your comment indicates some hypocrisy has occurred, so please let me know where.

And if you can, please also point an article on the Register about a Microsoft technology that receives 75% or greater positive comments. And if you find one, take a picture of the unicorn it's stapled to.

Hell, MS even get hate for taking down botnets here. It's gone beyond petty and turned into some kind of belief system.

12
12

Re: What...

"Please explain?"

I'll try...

"I tried TypeScript and took a good look at what it is and what it does last night (because a large part of the architecture I'm working on at the moment requires Javascript and it'd be nice if it were more managable)."

That's fine - I wasn't making any comment about TypeScript however.

"Your comment indicates some hypocrisy has occurred, so please let me know where."

Your characterization of peoples reason for not giving a positive response was a cliched over-generalisation, and at odds with the responses on here - there were some stupid nay-sayers sure, but also, e.g. some others questioning the need for OO, some questioning motives (fair enough given the history - this are changing at Microsoft, but you have to earn trust as they say.. and for some they don't have enough credit yet) and so on. In short, i'm not seeing the vitriol or reason for not liking TypeScript you seem to be implying. Hence you seem to be falling in the stereotype you put forward for others.

"Hell, MS even get hate for taking down botnets here. It's gone beyond petty and turned into some kind of belief system."

Really ? I've not seem any significant 'hate' for that, quite the opposite.

12
1
Silver badge

Re: What...

Fair enough - now, where's that unicorn?

2
7

Re: What...

"Fair enough - now, where's that unicorn?"

Fair point too.

Truth is, i'm struggling to find an article about any major commerical OS supplier that has 75% positive ratings. It's almost as if.... none of them have done anything worthy of that level of support ;)

3
0
Silver badge

Re: What...

I'll settle for 50% or thereabouts. 50% is still unicorn territory for MS. Anything over 20% and they've obviously produced something spectacular.

2
4
Silver badge

Re: What...

It's a library that compiles code to javascript. If you have ever worked seriously with javascript, getting code you've written yourself to work correctly across all major browsers is a pain in the arse.

Getting javascript code that has been written by a machine to work correctly across all major browsers is going to be a pain in the arse that repeats every time you change the original 'TypeScript' and recompile.

Besides which, we all know javascript by now. It's not that hard to write unobtrusive, elegant JS, so why stick an obfuscation layer in between?

3
2

Re: What...

Yes, admittedly I can see a scenario where you just *cannot* make the scompiler produce the code you want, but I guess that depends on what parts of what is generated is non-browser compatible. ost of what you write (in theory!) is going to be plain ol' Javascript, and that should (in theory!) make it no *harder* to write for compatibility.

Of course it won't be any *easier* either...

0
0
Silver badge

Re: What...

"Getting javascript code that has been written by a machine to work correctly across all major browsers is going to be a pain in the arse that repeats every time you change the original 'TypeScript' and recompile."

I disagree. If I have to pay attention to differences between browsers, I'm going to forget something or miss something. If I can let Microsoft take care or a translation system that will take care of any differences itself, and this system is in use by millions of people so that any problems or errors are found and fixed very quickly, it's going to be far less of a hassle to me as a programmer.

"Besides which, we all know javascript by now. It's not that hard to write unobtrusive, elegant JS, so why stick an obfuscation layer in between?"

If you don't see how much easier it can be to develop large web-based applications with actual classes, structures, being able to develop an IDE (as MS have) which respects variable types even though Javascript does not and other features, then you've probably never worked with more serious languages such as Java, C++, Python, etc. Bringing *some* of the power of that to Javascript, definitely makes things much easier. There's no question about that.

8
2
Bronze badge
Mushroom

Re: What...

Microsoft have the best over all development language and development tools products over a long long history than any vendor by miles, so probably not a lot...

I would cite Powershell as an example - far more powerful than the legacy shell scripting languages that were the only previous comparable option, and fully object orientated - developed from scratch - and being rapidly adopted all over the place. For instance by VMWare for ESXi.

0
9
Silver badge
Stop

Re: What...

MS have made some major blunders in programming languages (although I'll grant you that their IDEs are always excellent). JScript, MFCs, ActiveX components, VBScript, others. Personally, I think VB should have been strangled at birth but opinions vary on that one.

Incompatabilities and weird behaviours have been fairly rife over the years.

However, since roughly 2008, this seems to be deprecated behaviour. Since then, they've been solidly aiming for cross-compatibility and standards compliance. I suspect Hejlsberg has a lot to do with this.

It's a good trait and I hope it continues.

10
0
Anonymous Coward

Re: What...

@dogged: "It's Microsoft, therefore it's foul and evil and wicked"

How long have you worked in software development? I'm guessing not long enough to know why the author says, "...readers may recall that Microsoft has form giving the world new technologies, but not always for altruistic reasons".

That's an understatement. As an example, ever wondered why so many companies persist in using IE6 internally? Microsoft took the standards underpinning the Web and "made them better". What that amounted to was a view of the Internet that only looked right through MS technology. It ended up biting everyone because even MS can't support its own distorted 'standards' indefinitely, and the companies/goverments that bought into it are looking at a huge bill for digging themselves out again.

If you're a developer, do yourself (and your client) a big favour and stick to standards. Don't get caught in the "standards-plus" trap - it will cost you dearly to escape.

9
1
Silver badge
Holmes

Re: What...

How long have you worked in software development?

Seventeen years. Shit, where did the time go?

And yes, as commented above, I know exactly how bad things used to be. And how bad they're not any more. It's useful to be able to retain a sense of distance and not take things personally. For example, all American TV used to be shit. Now I'm pressed to find enough time to watch Breaking Bad, Boardwalk Empire and Sons of Anarchy and there are several others I hope to try when I get some time off.

If we all went around thinking "All Microsoft products are shit all the time and they are evil and I hate them because IE6 was fucking awful (which I'm not arguing, by the way) and Steve Ballmer once said a mean thing about linux" we'd be as stupid as Eadon or Bob Vistakin.

A good tool doesn't stop being a good tool just because it says "Microsoft" on it. An open source product doesn't become a closed source product because it was written in Redmond.

If MS try to close TypeScript, I will personally fork it and leave the latest open version on Github. But I doubt very much that they will. Playing the game the old way clearly doesn't produce as much revenue as playing it the new way.

9
1
Silver badge
FAIL

Re: What...

Utter tosh. You can develop class based JS applications perfectly fine in JS right now, no external tools required.

Personally, I don't think developing in an IDE is the epitome of sophistication, I don't think compiling one language into another interpreted language* that runs on a variety of interpreters is a particularly effective way of mastering incompatibilities between those interpreters, and I definitely will not want ever to debug javascript issues emanating from auto generated code.

I'll pass on your ad hominem quips; I develop daily in C, C++ and Python, thankfully haven't had to use anything Java related in 12 years.

* However, when the language compiled to is only used as an intermediate, and immediately re-compiled against a single backend, this is an exceptionally good pattern. For instance, clang++ will first translate C++ into C, which is then immediately compiled into object code.

0
11
Silver badge

Re: What...

"Utter tosh. You can develop class based JS applications perfectly fine in JS right now, no external tools required."

No, I don't think you can. Everything in Javascript is an object, but that doesn't mean you can develop class based code in pure Javascript. Scope? Inheritance? There's no Class keyword in Javascript. Creating a function and pretending it is a class is not a substitute. You're wrong to say "utter tosh". Trying to say that Javascript supports OOAD / Class-based applications is rubbish. There are some very loose, partial work-arounds that were never intended by the designers and which omit fundamental elements of class based design.

"I definitely will not want ever to debug javascript issues emanating from auto generated code."

And yet you say that you daily develop in C++ and Python. Do you not also reject these because you don't want to have to debug the intermediary C code that both generate during compile? Same principle and assuming that TypeScript does what it says (and it's a lot simpler than a C++ or Python compiler), then the same in practice, too.

5
0
Silver badge
Devil

Re: What...

Extend, freely embrace.....? I'm a M$ fan TBH but even I can't help a little doubt when they start giving stuff away for free.

1
1
Vic
Silver badge

Re: What...

> If I can let Microsoft take care or a translation system

And that's the big "if"...

On the face of it, this seems to be a Good Thing(tm) for all the reasons you state. The worry I would have is whether the cross-browser stuff actually works properly - will MS write stuff the works as well for Firefox as it does for IE, or will one platform get a little extra love?

If MS do a good job on the browser-neutrality front, TypeScript could be a really god thing. If it produces borked code for anything except IE, it is worse than useless. I'll wait until I've actually tried it before drawing any conclusions...

Vic.

2
0
Silver badge

Re: What...

"And that's the big "if"..."

I don't think it's a big 'if'. Maybe time will prove me wrong but there are two components to that 'if'. Technical ability and good will. For the technical requirements, MS already manage vastly more complicated projects fine. The TalkScript to Javascript compiler is far, far less complicated than even just a VB compiler. And you get bugs in compiled code, but it's very rare that they're due to the compiler rather than the programmer. So that leaves good will. The advantage with the latter is that this has been released free and open. MS can be kept honest by the fact that others can implement it as well. As was pointed out elsewhere, there's nothing to stop Eclipse making a TypeScript plugin for their IDE for example. So we have a solid insurance policy. If MS want this to be successful, and they surely do, then they want it to work well in all browsers otherwise it will hurt uptake.

Time could prove me wrong, but there are strong arguments that we should be safe on this. IMO.

2
1
Silver badge
FAIL

Re: What...

It's not even close to the same principle:

GCC compiles C++ straight to object code.

Debugging C++ using GDB or similar does not have you examining some generated C code, you step through C++ statements.

Python does not 'generate intermediary C code', it generates python bytecode which runs on a singly specified C python interpreter.

clang++ does translate C++ to C prior to compiling it to object code, but it translates it to only be compiled by clang - it does not generate C which it expects icc, gcc or bcc to compile.

A frontend generating code to be used by it's coupled backend == good, a frontend generating code to be used by unrelated backends that do not strictly conform to any standards == bad. Do you need diagrams, or have you got it yet?

And yes, it is a real fucking pain in the arse when you write valid python code, run it on the python interpreter, and end up having to debug the python interpreter. Fortunately, this almost never happens, since the bytecode compiler and the interpreter are tightly coupled. which they aren't in TypeScript.

So perhaps there is some use for this tool. Some flawed minds can seemingly only cope with "OOP == Java" mindset, and this allows them to master the difficulties that are javascript. Or for those shops that previously would use a nice ActiveX control to ensure lock in, here is another bit of technology that will make your clients either come back to only you for improvements, or re-do the entire project from scratch. I was too harsh! And you can do it in an IDE?! Whatever will these clever guys think of next.

4
6
Silver badge

Re: What...

"It's not that hard to write unobtrusive, elegant JS, so why stick an obfuscation layer in between?"

Depends what you're doing. For the small stuff it's fine, if you're doing large frameworks (not necessarily web-based; js is a general purpose language) of several thousand lines then you have to be *obsessive* about putting type-checking assertions in absobloodylutely everywhere. And that's run-time of course so you can never be sure you've found them all.

A static tool to do this would be a godsend, depending. If it does type inferencing to give the flexibility of run-time typing with compile-time safety, marvellous. I'll have to take a look.

What I'd like to see is a proper js or whatever compiler with this stuff built in so the static typing guarantees could be propagated into code as optimisations (= faster code & a simpler compiler). Obviously you can't do that nearly as well if your target is jscript.

That it's produced by MS, whether open and forkable or not, gives me some unease though. I've had too much experience with them to trust them any more.

1
0
Silver badge
Thumb Down

Re: What...

@Tom 38: Utter tosh. You can develop class based JS applications perfectly fine in JS right now, no external tools required.

Let's accept, for the sake of argument, that you, as a superior being, can do so. Now think about the junior developers who seem to be in the majority on an average team. People who mostly got into programming because they thought it would pay well, who have scant knowledge of how the language they're using works, and little enthusiasm for finding out. With a robust, strongly-typed language these developers stand a fair chance of turning out code that does what is required and doesn't do lots of other things that aren't required. JavaScript, fine language though it is, has far too many nasty little traps to be suitable.

I definitely will not want ever to debug javascript issues emanating from auto generated code

These days, anything but the most trivial scripts are "compiled" (i.e. compressed and obfuscated) before deployment. You can only debug these with tools that relate the deployed code to the original script. I don't know about TypeScript, but I would expect any compile-to-JS platform to include this feature by default.

Personally, I don't think developing in an IDE is the epitome of sophistication

Yeah. Real men write their programs using vi/emacs/edlin/edt/whatever, and compile them by keying in the opcodes. Nice to hear the old ones again.

5
1
Anonymous Coward

Re: What...

mmm...

lack of standards compliance generally, and Microsoft's active role in undermining open document standards in particular;

the organisation responsible for IE6

do you remember visual basic version upgrades that reversed logical operators?

BSODding

withdrawing a product because they get bored with it

activex

.net

the trumpeting in advance of the release of Vista

the general never buy v1.0 of any Microsoft product wisdom

3
6
WTF?

Re: What...

If you're a developer, do yourself (and your client) a big favour and stick to standards. Don't get caught in the "standards-plus" trap - it will cost you dearly to escape.

What, like Ajax, that non-standards-compliant addition to the browser by Microsoft that, oh I don't know, made the whole Web 2.0 revolution possible?

Standards are only worth following as long as they are not enforcing technological stagnation.

5
1
Silver badge

Re: What...

"Microsoft have the best over all development language and development tools products over a long long history than any vendor by miles, so probably not a lot..."

How have you managed to remain ignorant of the GNU project all these years?

0
3

Re: What...

http://www.digital-web.com/articles/scope_in_javascript/ - scope in Javascript

http://phrogz.net/JS/classes/OOPinJS2.html - inheritance in Javascript.

Both pages are 6+ years old. Javascript has been able to do this since before the days of IE6.

Just because it doesn't have a thing called a "class" doesn't mean it's lacking these two...it was developed as an OO scripting language right from the start.

1
0
Anonymous Coward

@h4rm0ny

"I disagree. If I have to pay attention to differences between browsers, I'm going to forget something or miss something. If I can let Microsoft take care or a translation system that will take care of any differences itself, and this system is in use by millions of people so that any problems or errors are found and fixed very quickly, it's going to be far less of a hassle to me as a programmer."

Microsoft has such a great rich history of that. They browser sniff to disable the use of other browsers. How many times have they done that? Plenty of times. They settle with the EU in that they would give the users a screen of other browsers to use. Care to guess what happened after a SP; yep, the screen was no longer there.

0
1
Bronze badge
Mushroom

Re: What...

There is always a good reason. In this case a screw you to Google...

0
2
Bronze badge
Mushroom

Re: What...

Because in 20 years of working in large enterprises I have never seen a developer using a 'GNU' IDE? Almost all use Microsoft, with some niche Eclipse, Borland, etc...

1
3
Anonymous Coward

Re: What...

20 years of age != 20 years of working in large enterprises

There's a whole team here developing in C# for .net on Vim/Emacs on Cygwin/Linux. Having a proper Posix environment at your disposal does wonders for your sanity and your productivity.

Who uses Borland? At all?

0
0
Linux

They just killed .NET for Windows 8, why this now?

This should be called .DOA because I think it will be stillborn.

9
8
Facepalm

Re: They just killed .NET for Windows 8, why this now?

Because... this is web-tech? The output is still plain old Javascript.

3
3
Anonymous Coward

Re: They just killed .NET for Windows 8, why this now?

"They just killed .NET for Windows 8, why this now?"

Because they just released VS2012, and it's as stupid as shit to look at as Metro was, and this toolkit only works on 2012.

What the hell is going on in Redmond.

1
3
Silver badge

Re: They just killed .NET for Windows 8, why this now?

"Because they just released VS2012, and it's as stupid as shit to look at as Metro was, and this toolkit only works on 2012."

You don't have to use VS2012 to write this. It's just nice to do so. You can download a commandline TypeScript compiler. It's already right there on the Download page for TypeScript. You didn't even bother to check before you posted the above misinformation. And it's open and free so there's no reason at all that an IDE based on TypeScript can't be built for Eclipse or anything else.

1
0
Bronze badge
Mushroom

Re: They just killed .NET for Windows 8, why this now?

.Net is still supported in Windows 8. The is just an optional newer CLR - in WinRT.

2
0
Anonymous Coward

Re: They just killed .NET for Windows 8, why this now?

It's about averages, not what is possible.

Microsoft have just been passed by Google. This is because they get endless feedback from techies, and then marketing ignores it.

They describe google as more innovative, which it is, and then at Redmond, some marketing bod, says "Look we need to be more innovative. Make me something like that."

I'm truly depressed at how little they pay attention to obviously correct feedback. After marketing have screwed major pensions out of the company, they'll move on.

It's a real tragedy, but the techies I know are still brilliant, but the direction they get is just stupid as sh*t. They have people with IQs of a hundred, dictating what people with IQs of 150 should be doing.

1
1
Silver badge

Re: They just killed .NET for Windows 8, why this now?

"says "Look we need to be more innovative. Make me something like that.""

Feature for feature, TypeScript knocks CoffeeScript all over the place. Dart I'm not very familiar with but that's a very different principle. With TypeScript you have instant compatability with any browser that does Javascript.

4
0
Silver badge

Re: They just killed .NET for Windows 8, why this now?

.NET is still supported in Windows 8. And what's with the Linux logo when you're complaining about a (supposed) lack of .NET?

3
0
Bronze badge

Trust MS...not so much...

Given MS's past with this sort of thing I'm not getting on board with it. I don't trust they wont try to hook developers with it and then monkey with it afterwards or take it back to closed source and then do what they've done before.

14
2
Anonymous Coward

Huh

Read this entire article hoping for maybe a sentence or two about why this new language is supposed to be better or at least how it's different. Now I know just as much as before I saw the article.

8
1
Anonymous Coward

MS FO

4
1
Anonymous Coward

Plan to rule the world!

Google ==> Dart

Microsoft ==> TypeScript

Let the battle begin...

Where is the popcorn?

5
0

This post has been deleted by its author

Bronze badge

...turns out typescript is already patented...

New name = "poo water"

It looks a lot like coffee...

4
1
Silver badge
Meh

What a laugh if ...

Google developed a new Android OS using MS sponsored software?

At least MS didn't steal it like they did XML/Word from that Canadian company.

3
0
Silver badge

Re: What a laugh if ...

Remember that MS's definition of "open" is not our definition of "open". The Office XML standards are "open" and yet infected with patents that prevent an open implementation (just one example).

Only a dribbling moron would use any MS tech without the understanding that they will be locked-in to that vendor.

8
2
Bronze badge
Mushroom

Re: What a laugh if ...

Only if you want to tie them up in GPL licences. There is nothing stopping you implementing a truely open version of Office XML.

0
6
Anonymous Coward

Re: What a laugh if ...

@Big Yin: How do you think the GPL works? I am not totally free to implement anything covered by the GPL because it is protected by patents. If I want to implement from the GPL, I have to copyleft amongst other things, that is a restriction on my freedom to use the code covered by GPL.

There are other FOSS licences where you have to hand over a pint to the author, or you can use the code if it's "not for evil" (I kid you not) others where you have to be vegetarian, or send a postcard to the author, all of these are restrictions on how the code it used.

2
3

Page:

This topic is closed for new posts.

Forums