Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
TypeScript and node.js
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  Messages 26 - 41 of 41 - Collapse all  -  Translate all to Translated (View all originals) < Older 
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Alexey Petrushin  
View profile  
 More options Oct 1 2012, 7:02 pm
From: Alexey Petrushin <alexey.petrus...@gmail.com>
Date: Mon, 1 Oct 2012 16:02:22 -0700 (PDT)
Local: Mon, Oct 1 2012 7:02 pm
Subject: Re: [nodejs] TypeScript and node.js

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)
    }


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Rick Waldron  
View profile  
 More options Oct 1 2012, 7:05 pm
From: Rick Waldron <waldron.r...@gmail.com>
Date: Mon, 1 Oct 2012 19:05:10 -0400
Local: Mon, Oct 1 2012 7:05 pm
Subject: Re: [nodejs] TypeScript and node.js

On Mon, Oct 1, 2012 at 7:00 PM, Alexey Petrushin <alexey.petrus...@gmail.com

An imperative "assertion" is not the same as simply ensuring that your
actual code only ever passes a value of a single specific type.

Rick


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Dick Hardt  
View profile  
 More options Oct 1 2012, 7:11 pm
From: Dick Hardt <dick.ha...@gmail.com>
Date: Mon, 1 Oct 2012 16:10:58 -0700
Local: Mon, Oct 1 2012 7:10 pm
Subject: Re: [nodejs] TypeScript and node.js

+1 to putting this on your blog Isaac.

On Oct 1, 2012, at 3:50 PM, Rick Waldron <waldron.r...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Shripad K  
View profile  
 More options Oct 1 2012, 10:46 pm
From: Shripad K <assortmentofso...@gmail.com>
Date: Tue, 2 Oct 2012 08:16:29 +0530
Local: Mon, Oct 1 2012 10:46 pm
Subject: Re: [nodejs] TypeScript and node.js

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;
 }

If it can translate properly, this definitely looks like a big plus for
easing development in JS.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Raffaele Sena  
View profile  
 More options Oct 1 2012, 11:18 pm
From: Raffaele Sena <raff...@gmail.com>
Date: Mon, 1 Oct 2012 20:18:02 -0700
Local: Mon, Oct 1 2012 11:18 pm
Subject: Re: [nodejs] TypeScript and node.js
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 things I couldn't properly translate)

-- Raffaele


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Shripad K  
View profile  
 More options Oct 1 2012, 11:20 pm
From: Shripad K <assortmentofso...@gmail.com>
Date: Tue, 2 Oct 2012 08:49:39 +0530
Local: Mon, Oct 1 2012 11:19 pm
Subject: Re: [nodejs] TypeScript and node.js

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. It would be cool if it could support multiple
constructors/methods. Helps in converting this code:

var Test = (function () {
    function Test(message) {
        if(typeof message === "string) {
           this.greeting = message;
        } else if(typeof message === "number") {
           this.num = message;
        }
    };
    Test.prototype.setGreeting = function (message) {
          this.greeting = message;
    };
    Test.prototype.setNum = function(num) {
          this.num = num;
    };
    Test.prototype.getNum = function() {
          return this.num;
    };
    Test.prototype.getGreeting = function() {
          return this.greeting;
    };
    return Greeter;

})();

to a much cleaner code.. something like this:

class Greeter {
        num: number = 0;
greeting: string = "";
 constructor (message: string) {
this.greeting = message;

}

        construtor (message: number) {
                this.num = message;
        }
void set(message: string) {
this.greeting = message;
 }
        void set(message: number) {
                this.num = message;
        }
        string getGreeting() {
                return this.greeting;
        }
        string getNum() {
                return this.num;
        }

}

On Tue, Oct 2, 2012 at 8:16 AM, Shripad K <assortmentofso...@gmail.com>wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Yi Tan  
View profile  
 More options Oct 2 2012, 1:55 am
From: Yi Tan <yi2...@gmail.com>
Date: Tue, 2 Oct 2012 13:55:09 +0800
Local: Tues, Oct 2 2012 1:55 am
Subject: Re: [nodejs] TypeScript and node.js

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>


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
greelgorke  
View profile  
 More options Oct 2 2012, 8:06 am
From: greelgorke <greelgo...@gmail.com>
Date: Tue, 2 Oct 2012 05:06:25 -0700 (PDT)
Local: Tues, Oct 2 2012 8:06 am
Subject: Re: [nodejs] TypeScript and node.js

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 with
java i save much development time with js.

plus: maintainability is a two headed beast, and it comes first through a
clean code und documentation, it don't really matters which language it is.

Typescript sounds more like a me2 to me, nothing more. i wonder if it will
be there in 1-3 years or even leave the .net ecosystem.

Am Montag, 1. Oktober 2012 22:50:01 UTC+2 schrieb Dick Hardt:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
José F. Romaniello  
View profile  
 More options Oct 2 2012, 8:37 am
From: José F. Romaniello <jfromanie...@gmail.com>
Date: Tue, 2 Oct 2012 09:36:51 -0300
Local: Tues, Oct 2 2012 8:36 am
Subject: Re: [nodejs] TypeScript and node.js

+1. I come from .Net (I am C# MVP) and this is exactly my opinion. TDD
saves me from debugging not statical typing.

There is also another confusion I see a lot, when talking about node and
JavaScript with people that comes from .Net and Java often I heard things
like:

- "it is not self documented"
- "you dont have intellisense, how do you know how to call this api? "
- "this library uses new Thing() and this other one uses thing(), how do
you know which one"

Having intellisense and code completion is a great thing, but do the
exercise of trying to use [N]Hibernate (which is a big ORM library) without
going to the website to see the usage... Or even better try to use log4net
which is an small logging library without going to the documentation. It is
a plus but it is just not enough, and you have to pay a big price.

2012/10/2 greelgorke <greelgo...@gmail.com>


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Stephen Handley  
View profile  
 More options Oct 2 2012, 1:43 pm
From: Stephen Handley <stephen.hand...@gmail.com>
Date: Tue, 2 Oct 2012 10:43:52 -0700 (PDT)
Local: Tues, Oct 2 2012 1:43 pm
Subject: Re: [nodejs] TypeScript and node.js

+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.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Mark Hahn  
View profile  
 More options Oct 2 2012, 2:08 pm
From: Mark Hahn <m...@hahnca.com>
Date: Tue, 2 Oct 2012 11:07:43 -0700
Local: Tues, Oct 2 2012 2:07 pm
Subject: Re: [nodejs] TypeScript and node.js

> 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.com>wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
José F. Romaniello  
View profile  
 More options Oct 2 2012, 2:30 pm
From: José F. Romaniello <jfromanie...@gmail.com>
Date: Tue, 2 Oct 2012 15:30:17 -0300
Local: Tues, Oct 2 2012 2:30 pm
Subject: Re: [nodejs] TypeScript and node.js

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 another language (even if is small subset of
   javascript)
   - I don't need Visual Studio Professional, an expensive IDE in terms of
   money and in terms of resources. As my friend Gustavo said visual studio is
   an IDE that can be used to handle from databases to manual tests)
   - sublime is really fast at doing this

If I choose to pay this price for having a very detailed code completion
feature what's the benefit I get? And one of the things i was explaining is
that people always tell me about self documented code and in my experience
that doesn't work quite well. Try to use hibernate or log4j for the first
time without the documentation just with eclipse code completion.

2012/10/2 Mark Hahn <m...@hahnca.com>


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Rick Waldron  
View profile  
 More options Oct 2 2012, 2:46 pm
From: Rick Waldron <waldron.r...@gmail.com>
Date: Tue, 2 Oct 2012 14:45:11 -0400
Local: Tues, Oct 2 2012 2:45 pm
Subject: Re: [nodejs] TypeScript and node.js

On Tue, Oct 2, 2012 at 1:43 PM, Stephen Handley
<stephen.hand...@gmail.com>wrote:

> +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 yesterday:
http://blog.izs.me/post/32697104162/thoughts-on-typescript

:)

Rick


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Dominick Pham  
View profile  
 More options Oct 2 2012, 4:47 pm
From: Dominick Pham <dominick.p...@gmail.com>
Date: Tue, 2 Oct 2012 13:47:46 -0700 (PDT)
Local: Tues, Oct 2 2012 4:47 pm
Subject: Re: [nodejs] TypeScript and node.js

semi-related note, I'm very impressed that cloud9 already has TypeScript
support
https://c9.io/site/blog/2012/10/typescript-support-in-cloud9/


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Daniel Morilha  
View profile  
 More options Oct 2 2012, 7:20 pm
From: Daniel Morilha <dmori...@gmail.com>
Date: Tue, 2 Oct 2012 16:19:36 -0700
Local: Tues, Oct 2 2012 7:19 pm
Subject: Re: [nodejs] TypeScript and node.js

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 <dominick.p...@gmail.com>wrote:

--
Daniel Morilha (dmori...@gmail.com)

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Max Nanasy  
View profile  
 More options Oct 3 2012, 9:53 pm
From: Max Nanasy <madmardiga...@gmail.com>
Date: Wed, 3 Oct 2012 18:53:09 -0700 (PDT)
Local: Wed, Oct 3 2012 9:53 pm
Subject: Re: [nodejs] TypeScript and node.js

Among other reasons, C++ doesn't run on web browsers.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages < Older 
« Back to Discussions « Newer topic     Older topic »