Click here to Skip to main content
15,894,405 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.

 
GeneralRe: Babes in the Wood Pin
Rage24-Apr-14 3:33
professionalRage24-Apr-14 3:33 
GeneralRe: Babes in the Wood Pin
Tim Carmichael24-Apr-14 3:52
Tim Carmichael24-Apr-14 3:52 
GeneralRe: Babes in the Wood Pin
Rage24-Apr-14 3:56
professionalRage24-Apr-14 3:56 
GeneralRe: Babes in the Wood Pin
chriselst24-Apr-14 2:07
professionalchriselst24-Apr-14 2:07 
GeneralRe: Babes in the Wood Pin
Marco Bertschi24-Apr-14 2:09
protectorMarco Bertschi24-Apr-14 2:09 
GeneralRe: Babes in the Wood Pin
Chris Quinn24-Apr-14 4:32
Chris Quinn24-Apr-14 4:32 
GeneralRe: Babes in the Wood Pin
chriselst24-Apr-14 4:50
professionalchriselst24-Apr-14 4:50 
GeneralA one-day experience with TypeScript Pin
Antonino Porcino23-Apr-14 23:02
Antonino Porcino23-Apr-14 23: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 Pin
Rage24-Apr-14 1:40
professionalRage24-Apr-14 1:40 
GeneralRe: A one-day experience with TypeScript Pin
newton.saber24-Apr-14 2:03
newton.saber24-Apr-14 2:03 
GeneralRe: A one-day experience with TypeScript Pin
Antonino Porcino24-Apr-14 4:20
Antonino Porcino24-Apr-14 4:20 
GeneralCCC 24/4/14 Pin
Dalek Dave23-Apr-14 22:24
professionalDalek Dave23-Apr-14 22:24 
GeneralRe: CCC 24/4/14 Pin
Motor Viper23-Apr-14 22:29
professionalMotor Viper23-Apr-14 22:29 
GeneralRe: CCC 24/4/14 Pin
Dalek Dave23-Apr-14 22:30
professionalDalek Dave23-Apr-14 22:30 
GeneralRe: CCC 24/4/14 Pin
Motor Viper23-Apr-14 22:30
professionalMotor Viper23-Apr-14 22:30 
GeneralRe: CCC 24/4/14 Pin
Rage24-Apr-14 1:41
professionalRage24-Apr-14 1:41 
GeneralRe: CCC 24/4/14 Pin
Keith Barrow23-Apr-14 22:36
professionalKeith Barrow23-Apr-14 22:36 
GeneralMQOTD Pin
V.23-Apr-14 21:30
professionalV.23-Apr-14 21:30 
GeneralRe: MQOTD Pin
Mark_Wallace23-Apr-14 21:36
Mark_Wallace23-Apr-14 21:36 
GeneralRe: MQOTD Pin
Nagy Vilmos23-Apr-14 21:57
professionalNagy Vilmos23-Apr-14 21:57 
GeneralRe: MQOTD Pin
OriginalGriff23-Apr-14 21:59
mveOriginalGriff23-Apr-14 21:59 
GeneralRe: MQOTD Pin
Agent__00723-Apr-14 22:04
professionalAgent__00723-Apr-14 22:04 
GeneralRe: MQOTD Pin
V.24-Apr-14 21:39
professionalV.24-Apr-14 21:39 
GeneralRe: MQOTD Pin
Agent__00724-Apr-14 22:56
professionalAgent__00724-Apr-14 22:56 
GeneralRe: MQOTD Pin
V.25-Apr-14 0:27
professionalV.25-Apr-14 0:27 

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

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