C# like syntax...

Topics: General, Language Specification
Oct 11, 2012 at 10:34 AM

Please create C# like syntax for 'extends','export', 'constructor' for easier to work

Thanks

Oct 11, 2012 at 2:05 PM

What's so hard to understand about the extends, export and constructor keywords? Are you kidding me?

Oct 11, 2012 at 9:03 PM

I said easier to work not easier to understand.

Because most programmers accustoms c# style programming!!!

Coordinator
Oct 11, 2012 at 10:25 PM
Edited Oct 11, 2012 at 10:26 PM

The syntax for classes and modules comes largely from the ECMAScript 6 proposal (esp. 'extends' and 'constructor'), which TypeScript tries to align to.  TypeScript is heavily focused on being a superset of JavaScript, so using the proposed syntax is a natural fit.

Oct 15, 2012 at 3:46 PM

TypeScript isn't just for C# developers and it makes sense for it to follow the ECMAScript 6 proposals. Quite a lot of OO languages actually use `extends` and `implments` rather than a colon - so it is arguably a better choice to use these for an open project like TypeScript.

Oct 16, 2012 at 2:41 PM
Edited Oct 16, 2012 at 2:43 PM
jonturner wrote:

The syntax for classes and modules comes largely from the ECMAScript 6 proposal (esp. 'extends' and 'constructor'), which TypeScript tries to align to.  TypeScript is heavily focused on being a superset of JavaScript, so using the proposed syntax is a natural fit.


Jon: You guys need to create a FAQ/sticky to stem the deluge of oblivious monoglot programmers demanding conformance to C#. It's starting to get really irritating. Sigh.

Oct 16, 2012 at 3:42 PM
oisin wrote:
jonturner wrote:

The syntax for classes and modules comes largely from the ECMAScript 6 proposal (esp. 'extends' and 'constructor'), which TypeScript tries to align to.  TypeScript is heavily focused on being a superset of JavaScript, so using the proposed syntax is a natural fit.


Jon: You guys need to create a FAQ/sticky to stem the deluge of oblivious monoglot programmers demanding conformance to C#. It's starting to get really irritating. Sigh.

Not sure a FAQ would be enough good enough to avoid those posts :S...

I Mean I already (AS a C#/.NET Developer even) thought it was stated VERY clearly where it comes from and what it aligns to, and therefore why we have the syntax we do, and I even think it is a great!, even though I still find my self accidentally typing ":" sometimes :P

But apparently it wasn't as clear stated as I thought it was on the bloody cover => (http://www.typescriptlang.org/)...
(2. line of text is apparently not clear enough >.<)... 

Oct 16, 2012 at 4:25 PM

created an issue about FAQ :)

Oct 18, 2012 at 11:25 AM
oisin wrote:
Jon: You guys need to create a FAQ/sticky to stem the deluge of oblivious monoglot programmers demanding conformance to C#. It's starting to get really irritating. Sigh.

Aw, you edited. I preferred the original.

Oct 18, 2012 at 7:32 PM

I've been programming in TypeScript exclusively for about 6 months now (I'm on an internal team within Microsoft using TypeScript) and at first I had some of the same inclinations... Make it more like C#... But now I'm glad that its found its own voice yet still has it roots deeply planted in JavaScript.  The reason I say that is because I find that while the strong typing stuff is great you still need to think about your app as a JavaScript app.  There are somethings that JavaScript is better at then C# and when those situations arise I want to do it the JavaScript way.  To me TypeScript is a really good blend of C# and JavaScript. Or as I've described it in the past, it's like C# with reflection emit on steroids...

 

Oct 19, 2012 at 11:53 AM
Edited Oct 19, 2012 at 11:54 AM

@ickman is on the button: "The reason I say that is because I find that while the strong typing stuff is great you still need to think about your app as a JavaScript app.  There are some things that JavaScript is better at then C# and when those situations arise I want to do it the JavaScript way."

Also don't forget that Microsoft has made a BIG statement through TypeScript in making it (so) open source, actually, to the extent that they have implemented source maps that none of their tooling supports yet but that is supported by a 'competitive' browsers ( such as Chrome).  That is a big step and as a community we should hugely encourage this!