Re: [nodejs] TypeScript and node.js

2012-10-03 Thread Max Nanasy
Among other reasons, C++ doesn't run on web browsers. On Tuesday, October 2, 2012 4:20:42 PM UTC-7, dmorilha wrote: so all of this to end up with a type safe, which compiles, has classes and the the syntax reminds C. So why not use C++? On Tue, Oct 2, 2012 at 1:47 PM, Dominick Pham

Re: [nodejs] TypeScript and node.js

2012-10-02 Thread greelgorke
A word about saving debugging time through statical typing: I come from java, and i can tell, that the strongly typed environment never reduced the debugging effort for me. 'use strict'-pragma, inclusive existence checking and unit-test save me from debugging not statical types. in comparison

Re: [nodejs] TypeScript and node.js

2012-10-02 Thread Stephen Handley
+1 on this being blogged. not into TypeScript but would be very interested in you elaborating on the two rules / js optimization info you mention in the beginning. On Monday, October 1, 2012 4:11:12 PM UTC-7, Dick Hardt wrote: +1 to putting this on your blog Isaac. On Oct 1, 2012, at 3:50

Re: [nodejs] TypeScript and node.js

2012-10-02 Thread Mark Hahn
Having intellisense and code completion is a great thing, Code completion works quite well in sublime text 2. It just looks at all your files and makes very intelligent guesses. On Tue, Oct 2, 2012 at 10:43 AM, Stephen Handley stephen.hand...@gmail.comwrote: +1 on this being blogged. not

Re: [nodejs] TypeScript and node.js

2012-10-02 Thread José F . Romaniello
AFAIK Sublime doesn't look all the files, it just provide code completion for the words within the current file. I saw a while ago an extension that did something alike but it was very slow. *My point is* that *this* code completion is useful and it is cheap; - I don't have to change to

Re: [nodejs] TypeScript and node.js

2012-10-02 Thread Rick Waldron
On Tue, Oct 2, 2012 at 1:43 PM, Stephen Handley stephen.hand...@gmail.comwrote: +1 on this being blogged. not into TypeScript but would be very interested in you elaborating on the two rules / js optimization info you mention in the beginning. Stephen, Isaac was kind enough to post this

Re: [nodejs] TypeScript and node.js

2012-10-02 Thread Dominick Pham
semi-related note, I'm very impressed that cloud9 already has TypeScript support https://c9.io/site/blog/2012/10/typescript-support-in-cloud9/ -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message

[nodejs] TypeScript and node.js

2012-10-01 Thread Tomasz Janczuk
What is your opinion of the value TypeScript can bring to node.js development? What is TypeScript: http://www.typescriptlang.org/Playground/ 1h video by Anders Hajlsberg: http://channel9.msdn.com/posts/Anders-Hejlsberg-Introducing-TypeScript Thanks, Tomasz -- Job Board:

Re: [nodejs] TypeScript and node.js

2012-10-01 Thread Lemol Morais Lutonda
...+ Brings Visual Studio developers to node.js..., or viceversa? Btw, there is also plugins for Sublime Text, Vim, Emacs. I think it is awesome! Atenciosamente, Leza Morais Lutonda, Lemol-C http://lemolsoft.webs.com http://github.com/lemol http://twitter.com/lemolsoft El 01-Oct-12 5:30 PM,

Re: [nodejs] TypeScript and node.js

2012-10-01 Thread José F . Romaniello
2012/10/1 Dick Hardt dick.ha...@gmail.com + Brings Visual Studio developers to node.js I was wondering about this... in the videohttp://channel9.msdn.com/posts/Anders-Hejlsberg-Introducing-TypeScript he does a lot of emphasis in the code completion (intellisense). What is the value of this

Re: [nodejs] TypeScript and node.js

2012-10-01 Thread Rick Waldron
On Mon, Oct 1, 2012 at 4:40 PM, José F. Romaniello jfromanie...@gmail.comwrote: 2012/10/1 Dick Hardt dick.ha...@gmail.com + Brings Visual Studio developers to node.js I was wondering about this... in the videohttp://channel9.msdn.com/posts/Anders-Hejlsberg-Introducing-TypeScript he

Re: [nodejs] TypeScript and node.js

2012-10-01 Thread Lemol Morais Lutonda
El 01-Oct-12 5:40 PM, José F. Romaniello escribió: I was wondering about this... in the video http://channel9.msdn.com/posts/Anders-Hejlsberg-Introducing-TypeScript he does a lot of emphasis in the code completion (intellisense). What is the value of this outside Visual Studio? Why you will

Re: [nodejs] TypeScript and node.js

2012-10-01 Thread Dick Hardt
On Oct 1, 2012, at 1:40 PM, José F. Romaniello jfromanie...@gmail.com wrote: 2012/10/1 Dick Hardt dick.ha...@gmail.com + Brings Visual Studio developers to node.js I was wondering about this... in the video he does a lot of emphasis in the code completion (intellisense). What is the

Re: [nodejs] TypeScript and node.js

2012-10-01 Thread José F . Romaniello
2012/10/1 Lemol Morais Lutonda leza...@fecrd.cujae.edu.cu At http://www.typescriptlang.org/#Download: There is also TypeScript support for other editors http://aka.ms/qwe1qu available. this is just syntax highlighting, no code completion -- Job Board: http://jobs.nodejs.org/ Posting

Re: [nodejs] TypeScript and node.js

2012-10-01 Thread José F . Romaniello
2012/10/1 Rick Waldron waldron.r...@gmail.com The benefit comes when v8 can super-optimize your code because you have implied types. thanks! this is something I didn't know. I see some value there even for people like me not interested in compile time errors or working in visual studio

Re: [nodejs] TypeScript and node.js

2012-10-01 Thread Gustavo Machado
For less sophisticated developers (most people, and most of the VS market), the compiler errors will remove much debugging frustration and allow them to focus on creating rather than debugging. It also allows them to focus on creating instead of understanding what they are doing. Take the

Re: [nodejs] TypeScript and node.js

2012-10-01 Thread Rick Waldron
On Mon, Oct 1, 2012 at 5:15 PM, Gustavo Machado machad...@gmail.com wrote: For less sophisticated developers (most people, and most of the VS market), the compiler errors will remove much debugging frustration and allow them to focus on creating rather than debugging. It also allows them

Re: [nodejs] TypeScript and node.js

2012-10-01 Thread Mark Hahn
The above example is fairly contrived And useless. The JS would work fine passing it a number. On Mon, Oct 1, 2012 at 2:36 PM, Rick Waldron waldron.r...@gmail.com wrote: On Mon, Oct 1, 2012 at 5:15 PM, Gustavo Machado machad...@gmail.comwrote: For less sophisticated developers (most

Re: [nodejs] TypeScript and node.js

2012-10-01 Thread Gustavo Machado
Rick, that's super interesting however I've said most, and there's no reference to these type of optimizations in TypeScript. It even says in any browser, in any host, so who will perform those optimizations? Looks like TypeScript is not. Actually, this: Greeter.prototype.greet = function(a:

Re: [nodejs] TypeScript and node.js

2012-10-01 Thread Rick Waldron
On Mon, Oct 1, 2012 at 5:53 PM, Mark Hahn m...@hahnca.com wrote: The above example is fairly contrived And useless. The JS would work fine passing it a number. Did you actually read the entire example? I said that for you, but thanks for the additional coverage. Yes, it will work, that's

Re: [nodejs] TypeScript and node.js

2012-10-01 Thread Mark Hahn
Yes, it will work, that's not the point. Then give me an example that does make the point. I'm a little thick-headed. On Mon, Oct 1, 2012 at 2:59 PM, Rick Waldron waldron.r...@gmail.com wrote: On Mon, Oct 1, 2012 at 5:53 PM, Mark Hahn m...@hahnca.com wrote: The above example is fairly

Re: [nodejs] TypeScript and node.js

2012-10-01 Thread Rick Waldron
On Mon, Oct 1, 2012 at 5:58 PM, Gustavo Machado machad...@gmail.com wrote: Rick, that's super interesting however I've said most, and there's no reference to these type of optimizations in TypeScript. It even says in any browser, in any host, so who will perform those optimizations? Looks

Re: [nodejs] TypeScript and node.js

2012-10-01 Thread Rick Waldron
On Mon, Oct 1, 2012 at 6:03 PM, Mark Hahn m...@hahnca.com wrote: Yes, it will work, that's not the point. Then give me an example that does make the point. I'm a little thick-headed. See my last email to Gustavo. Rick On Mon, Oct 1, 2012 at 2:59 PM, Rick Waldron

Re: [nodejs] TypeScript and node.js

2012-10-01 Thread Rick Waldron
On Mon, Oct 1, 2012 at 6:18 PM, Mark Hahn m...@hahnca.com wrote: This will allow the runtime to then perform explicit string optimizations (whatever those might be). But there aren't any optimizations that can be made. All I'm asking for is one real use case that does something useful.

Re: [nodejs] TypeScript and node.js

2012-10-01 Thread Mark Hahn
if the runtime can assume that no type coercion needs to occur, it can skip that step all together, Ok, I get it now. This example is still really weak. You save at most a few nanoseconds. To me the extra typing wouldn't be worth it. I have to admit I'm really biased. Not having to type vars

Re: [nodejs] TypeScript and node.js

2012-10-01 Thread Isaac Schlueter
I've been through the paces quite a few times trying to optimize the hell out of very hot code. In the last few years, this has been mostly in V8, of course, but the basic principles are not too far off in different JS environments. It's important to not put too much weight in rules of thumb,

Re: [nodejs] TypeScript and node.js

2012-10-01 Thread Rick Waldron
On Mon, Oct 1, 2012 at 6:46 PM, Isaac Schlueter i...@izs.me wrote: I've been through the paces quite a few times trying to optimize the hell out of very hot code. In the last few years, this has been mostly in V8, of course, but the basic principles are not too far off in different JS

Re: [nodejs] TypeScript and node.js

2012-10-01 Thread Alexey Petrushin
It'd be a great idea to write up a TypeScript header file for the API surface in Node. Can't it be done with plain js? Something like this // Implementation file. fs.readFile = function(name, callback){...} // Header file with types. fs.untypedReadFile = fs.readFile

Re: [nodejs] TypeScript and node.js

2012-10-01 Thread Alexey Petrushin
Or shorter, like: // Header file with types. fs.untypedReadFile = fs.readFile fs.readFile = function(name, callback){ expect(name).to.have.type 'string' fs.untypedReadFile(name, callback) } -- Job Board: http://jobs.nodejs.org/ Posting guidelines:

Re: [nodejs] TypeScript and node.js

2012-10-01 Thread Rick Waldron
On Mon, Oct 1, 2012 at 7:00 PM, Alexey Petrushin alexey.petrus...@gmail.com wrote: It'd be a great idea to write up a TypeScript header file for the API surface in Node. Can't it be done with plain js? Something like this // Implementation file. fs.readFile = function(name,

Re: [nodejs] TypeScript and node.js

2012-10-01 Thread Dick Hardt
+1 to putting this on your blog Isaac. On Oct 1, 2012, at 3:50 PM, Rick Waldron waldron.r...@gmail.com wrote: On Mon, Oct 1, 2012 at 6:46 PM, Isaac Schlueter i...@izs.me wrote: I've been through the paces quite a few times trying to optimize the hell out of very hot code. In the last few

Re: [nodejs] TypeScript and node.js

2012-10-01 Thread Shripad K
I'm sorry I don't have Windows running to test it on. Can you write multiple constructors/methods of varying types? How does TypeScript translate this code to equivalent JS code? constructor (message: string) { this.greeting = message; } constructor (message: number) { this.greeting = message;

Re: [nodejs] TypeScript and node.js

2012-10-01 Thread Raffaele Sena
I just tried in the playground (http://www.typescriptlang.org/Playground/) and unfortunately it doesn't work. I also was hoping it could do this, but it's not a simple task if the underlying language doesn't support it (I wrote a Java to ActionScript converter and this is still one of the few

Re: [nodejs] TypeScript and node.js

2012-10-01 Thread Shripad K
Okay I just tried it in the TypeScript playground. Doesn't seem like it supports translating multiple constructors/methods. Also, support for pre-initialization of variables before constructor is invoked would also be a good feature. However, TypeScript is definitely a step in the right direction.

Re: [nodejs] TypeScript and node.js

2012-10-01 Thread Yi Tan
IMHO, TypeScript makes Javascript feel like ActionScript/Java/C#... loss JavaScript's agility, and the things smell awful enterprise My vote goes to coffeescript Regards, ty 2012/10/2 Shripad K assortmentofso...@gmail.com Okay I just tried it in the TypeScript playground. Doesn't seem like