Live data from Hacker News

TypeScript: a language for application-scale JavaScript development

typescriptlang.org

101–110 of 316 posts

Re: TypeScript: a language for application-scale JavaScript development

#101
> The scope of a parameter, local variable, or local function declared within a function declaration (including a constructor, member function, or member accessor declaration) or function expression is the body of that function declaration or function expression.

This thing claims to be meant for "application-scale" JavaScript, and yet doesn't repair even JavaScript's most notorious error?

A suggestion to the authors. Purchase this book:

http://www.amazon.com/JavaScript-Good-Parts-Douglas-Crockfor...

... then go through the book with a fine-tooth comb, and every time it describes something as a "bad part" or an "awful part", delete or fix that misfeature in TypeScript.

Re: TypeScript: a language for application-scale JavaScript development

#102
post #73

Earlier quoted context omitted.

Are we reading the same thing? Code is not sent to Microsoft.

Exactly. But if one clearly states that, perhaps there are others in the industry that do the oposite, iaw analyzing / scraping / calling home some code. Having that disclaimer makes them safe in case someone might notice that insert IDE / online editor here does that and rings the bell.

I think it just means that Microsoft has overzealous lawyers.

Re: TypeScript: a language for application-scale JavaScript development

#104
post #23

Earlier quoted context omitted.

No, we have not. Read John Carmack's posts on static code analysis to understand why.

I've been writing large-scale JS applications with SproutCore since 2007, and not once have I been bitten by a bug that would have been caught by static typing. Same with Objective-C and my iOS and Cocoa development (since the OpenStep days). I do use Scala on the server side though, and it helps there. But application development is, IMO, hindered by static typing. It's a lot more work to set up, and provides essent…

I noticed you mentioned scala on the server side. Does your comment about static typing being a hindrance apply to scala?

I would also argue that static typing provides a self-documenting benefit that is easy to forget, making it easier for someone unfamiliar with the codebase to understand what is going on. When I'm doing maintenance work I often start at the point of failure and work backwards, and it is very helpful when I can immediately identify what a variable is supposed to be representing.

Re: TypeScript: a language for application-scale JavaScript development

#105
post #68

$ t command not found clearly they could have named the compiler just 't' instead of the overly verbose 'tsc'. all those extra characters!!

If I develop an RSI and a doctor tells me it was by a matter of a hundred keystrokes, I'm coming for Ballmer's pelt.

Re: TypeScript: a language for application-scale JavaScript development

#106
post #9

Earlier quoted context omitted.

Also cool: in addition to the expected Visual Studio support, they've also provided support for Sublime Text, Emacs, and Vim. http://blogs.msdn.com/b/interoperability/archive/2012/10/01/...

Sourcing typescript.vim throws errors: http://pastebin.com/raw.php?i=HHDJDG7X

:e typescript.vim

:set ff=unix

:wq

fixes for me

Re: TypeScript: a language for application-scale JavaScript development

#107
post #39
post #18

Back in the day, Microsoft would use a strategy called "embrace, extend, extinguish." http://en.wikipedia.org/wiki/Embrace,_extend_and_extinguish Recently, Microsoft has been pushing Javascript very hard (embrace) and now it looks like they've started the "extend" phase. Luckily, no one really worries about them being able to pull off the "extinguish" part anymore... they just don't have enough market power these day…

Except that this is fully open source, which makes it a little difficult for MS to retain control over it, no? Re-reading late 90s M$ memes gets old after a time.

good point.

Re: TypeScript: a language for application-scale JavaScript development

#108
post #57

All of these compile-to-JS efforts are great, and as much as I love things like CoffeeScript I have to say I definitely worry about language fragmentation. JavaScript is full of flaws, but its monopoly in the browser space has brought about one intriguing and welcome side-effect: a VERY efficient market for both employers and employees. It's easy to overlook how important this common denominator has been for everyone…

Javascript is dreadfull , and its flaws are counter productive and intolerable. It has good things like closures and first class functions , and that's it. Most of js developpers hate javascript , but are forced to work with it. So they dont care what they use as client language provided it gets the job done. few people cares about Javascript. most of the devs hate it. But the browser as dev plateform is a fact.

Nah, you're generalizing. I know many JS developers and they all love Javascript in one way or another.

Re: TypeScript: a language for application-scale JavaScript development

#109

All of these compile-to-JS efforts are great, and as much as I love things like CoffeeScript I have to say I definitely worry about language fragmentation. JavaScript is full of flaws, but its monopoly in the browser space has brought about one intriguing and welcome side-effect: a VERY efficient market for both employers and employees. It's easy to overlook how important this common denominator has been for everyone…

I think you were referring to the JavaScript syntax when you said JavaScript is full of flaws, because IMHO the language itself - except the syntax component - is actually very good. Someone on Quora said[1] it very well: JavaScript is a wonderful language, deep down: It's Lisp-y, yet imperative. Its lack of support for threads has turned out to be a strength on the server side. And recent implementations have made i…

>Its lack of support for threads has turned out to be a strength on the server side.

ummmm, can someone elaborate? I don't understand that statement.

Re: TypeScript: a language for application-scale JavaScript development

#110
post #97

Earlier quoted context omitted.

I've written a LINQ style library for TypeScript that allows you to write something like this: from([1,2,3]).select(n => n * n).where(n >=2).toArray() which outputs [4, 9] Hoping to open source it soon. Edit: typo, n * 2 should have been n * n, sorry for the confusion

Wouldn't it output [4, 6]?

Ah yeah, typo, updated.
Post reply on HN