Click here to Skip to main content

Welcome to the Lounge

   

For lazing about and discussing anything in a software developer's life that takes your fancy.
The Lounge is rated PG. If you're about to post something you wouldn't want your kid sister to read then don't post it. No flame wars, no abusive conduct and please don't post ads.

Technical discussions are welcome, but if you need specific help please use the programming forums.


 
GeneralRe: Babes in the Wood PinprofessionalRage24-Apr-14 4:33 
GeneralRe: Babes in the Wood PinmemberTim Carmichael24-Apr-14 4:52 
GeneralRe: Babes in the Wood PinprofessionalRage24-Apr-14 4:56 
GeneralRe: Babes in the Wood Pinprofessionalchriselst24-Apr-14 3:07 
GeneralRe: Babes in the Wood PinprotectorMarco Bertschi24-Apr-14 3:09 
GeneralRe: Babes in the Wood PinmemberChris Quinn24-Apr-14 5:32 
GeneralRe: Babes in the Wood Pinprofessionalchriselst24-Apr-14 5:50 
GeneralA one-day experience with TypeScript [modified] PinmemberAntonino Porcino24-Apr-14 0:02 
After reading so much about it, I decided to give a try to TypeScript. I needed to write a large single page webapp, so instead of writing it in C# and compiling to JavaScript (with the Saltarelle compiler), I opted to give a try to TypeScript. After all, everybody was describing an experience similar to C# or Java, so I thought, why not?
 
I struggled one day converting an existing C# application making it work in Typescript. At the end of the day I just gave up, realizing it's not what I was looking for (that is, a language that hides all the JavaScript annoyances).
 
What made me renounce:
  • Intellisense sometimes slows down the Visual Studio editor, some other times stops working completely
  • Syntax highlight is very basic, e.g. there is no special color for type names, or other semantic elements
  • I really hate the ": type" syntax, it made me remember of old pascal days. You can get used to it, but you keep asking WHY??
  • Autocompletion works only with the tab or enter key (and not with other symbols like (,= as in C#)
  • class implementation lacks all the important features: operator overloads, extension methods and all the rest
  • I found that comparing two equal "Date" variables with "==" (and not "===") results in false! Ok, it's due to JavaScript but that's horrible.
  • Sometimes the compiler exits with an error without telling you what the error is, just "tsc.exe exit code 1".
  • When generating a single global .js file, the compiler doesn't handle class inheritance (what class comes first), so you have to stick with multiple file only.
  • Within a class, you have always to refer to "this", it's not optional like in C#. Sometimes it's annoying.
  • Found myself often going to CodePlex and discovering it's a known issue
 
Of course there are good points too:
  • debug directly within Visual Studio (break points and all the rest)
  • has import types for many javascript libraries (DefinitelyTyped)
  • Compared to C#, the dynamic syntax is much nicer for objects (no "new" keyword) and arrays
  • I like how interfaces are handled and also the "optional" members (though I dislike the "name?" syntax)
Overall, I would strongly suggest TypeScript only to existing JavaScript users. Developers coming from the Java/C# world are more likely to be disappointed, for them the "Dart" language is more appropriate (but sadly there is no Visual Studio plugin yet).
 
If you have tried TypeScript, what was your experience?

modified 24-Apr-14 9:38am.

GeneralRe: A one-day experience with TypeScript PinprofessionalRage24-Apr-14 2:40 
GeneralRe: A one-day experience with TypeScript Pinmembernewton.saber24-Apr-14 3:03 
GeneralRe: A one-day experience with TypeScript PinmemberAntonino Porcino24-Apr-14 5:20 
GeneralCCC 24/4/14 PinmemberDalek Dave23-Apr-14 23:24 
GeneralRe: CCC 24/4/14 PinmemberMotor Viper23-Apr-14 23:29 
GeneralRe: CCC 24/4/14 PinmemberDalek Dave23-Apr-14 23:30 
GeneralRe: CCC 24/4/14 PinmemberMotor Viper23-Apr-14 23:30 
GeneralRe: CCC 24/4/14 PinprofessionalRage24-Apr-14 2:41 
GeneralRe: CCC 24/4/14 PinmentorKeith Barrow23-Apr-14 23:36 
GeneralMQOTD PinprofessionalV.23-Apr-14 22:30 
GeneralRe: MQOTD PinmemberMark_Wallace23-Apr-14 22:36 
GeneralRe: MQOTD PinprofessionalNagy Vilmos23-Apr-14 22:57 
GeneralRe: MQOTD PinprotectorOriginalGriff23-Apr-14 22:59 
GeneralRe: MQOTD PinprofessionalAgent__00723-Apr-14 23:04 
GeneralRe: MQOTD PinprofessionalV.24-Apr-14 22:39 
GeneralRe: MQOTD PinprofessionalAgent__00724-Apr-14 23:56 
GeneralRe: MQOTD PinprofessionalV.25-Apr-14 1:27 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.


Advertise | Privacy | Mobile
Web04 | 2.8.141223.1 | Last Updated 25 Dec 2014
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid