Click here to Skip to main content
12,702,455 members (36,178 online)

Welcome to the Lounge

   

For discussing anything related to a software developer's life. Technical discussions are encouraged, but click here to ask your programming questions.

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, no programming questions and please don't post ads.
 
GeneralRe: Babes in the Wood Pin
Rage24-Apr-14 4:33
professionalRage24-Apr-14 4:33 
GeneralRe: Babes in the Wood Pin
Tim Carmichael24-Apr-14 4:52
memberTim Carmichael24-Apr-14 4:52 
GeneralRe: Babes in the Wood Pin
Rage24-Apr-14 4:56
professionalRage24-Apr-14 4:56 
GeneralRe: Babes in the Wood Pin
chriselst24-Apr-14 3:07
professionalchriselst24-Apr-14 3:07 
GeneralRe: Babes in the Wood Pin
Marco Bertschi24-Apr-14 3:09
protectorMarco Bertschi24-Apr-14 3:09 
GeneralRe: Babes in the Wood Pin
Chris Quinn24-Apr-14 5:32
memberChris Quinn24-Apr-14 5:32 
GeneralRe: Babes in the Wood Pin
chriselst24-Apr-14 5:50
professionalchriselst24-Apr-14 5:50 
GeneralA one-day experience with TypeScript Pin
Antonino Porcino24-Apr-14 0:02
memberAntonino 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 Pin
Rage24-Apr-14 2:40
professionalRage24-Apr-14 2:40 
GeneralRe: A one-day experience with TypeScript Pin
newton.saber24-Apr-14 3:03
membernewton.saber24-Apr-14 3:03 
GeneralRe: A one-day experience with TypeScript Pin
Antonino Porcino24-Apr-14 5:20
memberAntonino Porcino24-Apr-14 5:20 
GeneralCCC 24/4/14 Pin
Dalek Dave23-Apr-14 23:24
memberDalek Dave23-Apr-14 23:24 
GeneralRe: CCC 24/4/14 Pin
Motor Viper23-Apr-14 23:29
memberMotor Viper23-Apr-14 23:29 
GeneralRe: CCC 24/4/14 Pin
Dalek Dave23-Apr-14 23:30
memberDalek Dave23-Apr-14 23:30 
GeneralRe: CCC 24/4/14 Pin
Motor Viper23-Apr-14 23:30
memberMotor Viper23-Apr-14 23:30 
GeneralRe: CCC 24/4/14 Pin
Rage24-Apr-14 2:41
professionalRage24-Apr-14 2:41 
GeneralRe: CCC 24/4/14 Pin
Keith Barrow23-Apr-14 23:36
mentorKeith Barrow23-Apr-14 23:36 
GeneralMQOTD Pin
V.23-Apr-14 22:30
professionalV.23-Apr-14 22:30 
GeneralRe: MQOTD Pin
Mark_Wallace23-Apr-14 22:36
memberMark_Wallace23-Apr-14 22:36 
GeneralRe: MQOTD Pin
Nagy Vilmos23-Apr-14 22:57
professionalNagy Vilmos23-Apr-14 22:57 
GeneralRe: MQOTD Pin
OriginalGriff23-Apr-14 22:59
protectorOriginalGriff23-Apr-14 22:59 
GeneralRe: MQOTD Pin
Agent__00723-Apr-14 23:04
professionalAgent__00723-Apr-14 23:04 
GeneralRe: MQOTD Pin
V.24-Apr-14 22:39
professionalV.24-Apr-14 22:39 
GeneralRe: MQOTD Pin
Agent__00724-Apr-14 23:56
professionalAgent__00724-Apr-14 23:56 
GeneralRe: MQOTD Pin
V.25-Apr-14 1:27
professionalV.25-Apr-14 1: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.


Advertise | Privacy | Mobile
Web02 | 2.8.170118.1 | Last Updated 24 Jan 2017
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid