Live data from Hacker News

TypeScript: a language for application-scale JavaScript development

typescriptlang.org

261–270 of 316 posts

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

#261
post #109

Earlier quoted context omitted.

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

E.g. node.js + socket.io. The event-driven concurrency model makes it easier to write servers without worrying about race conditions and thread locks while also having less overhead from a heavy thread implementation. For some applications this has been quite good. The downside is that it can be a bit tricky to scale node.js larger but it's not too hard to run multiple processes or do other load balancing. It's not g…

> makes it easier to write servers without worrying about race conditions

So how do you handle concurrency without race conditions without using isolated processes or pure message passing? Ok so you don't have thread locks, big deal, but you still have shared data structured that could be updated in a non-deterministic order depending on which file descriptor gets fired first by epoll (or whatever select thingy is being used lately).

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

#262
post #4

Say what you want about whether this is a good idea or not, it is clear at least part of MS is really serious about open source. * TypeScript is under the Apache 2.0 license [1] * Source is available via git on Codeplex [2] * Installation is as easy as npm install -g typescript [3] Extra bonus coolness: They've provided an online playground like jsfiddle! [4]. [1] http://typescript.codeplex.com/license [2] http://typ…

I started doing C# development last year, coming from mostly a Unix/Perl platform, and I'm really glad about the timing because that's when Microsoft got serious about open development. I started doing web apps using ASP.NET MVC3, and this year MVC4 was released as an open-source project[1]. It seems that a bunch of 'young turks' have reached higher management positions in most of the key software development product…

[deleted]

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

#263
post #238

Earlier quoted context omitted.

And here's where I flash pocket aces: I sat in a room with no windows and no computers, across from men with strong chins and short haircuts, reviewing Windows NT source code line by line. On friggin' paper. Never heard of this guy. Never heard this story. It makes no sense, and I cannot even imagine what "automatically open the processor up to accept commands on start-up" means. Mr. Curry eventually met with senior…

Interesting. On Microsoft's own site they have http://support.microsoft.com/kb/93362 which does not list 4.0. But I found several references claiming that they did achieve C2 certification with service pack 6 in early 2000. My memory had that as a British certification that they claimed was equivalent, but Google is not turning up anything that supports my memory. However that said, by the time they got that many ser…

Interesting. On Microsoft's own site they have http://support.microsoft.com/kb/93362 which does not list 4.0.

I see 4.0 listed on the page. It's right at the bottom -- twice.

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

#264
post #148
post #57

Earlier quoted context omitted.

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.

Agreed, it's a terrible language. Among other things, it makes it way too easy to write code which many people will read as being correct, but will actually be subtly incorrect. A few of the weakest parts: - for (var x in y) when used for array iteration or even dict iteration; hasOwnProperty? Really? - x[obj] = y; seriously, did i really want '[Object object]' as my key? - the choice of function level scope over blo…

It might be nice to make a canonical list of things which suck about JavaScript.

https://hackpad.com/spTEgxqvFYj#Things-That-Suck-About-JavaS...

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

#265

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 forever stuck in design-by-committee hell, which dooms it long-term. Developers who do nothing but pure JavaScript and don't at least play around with the other options (Dart, TypeScript, Haxe, CoffeeScript, et al) are just going to be hurting themselves long-term. It is always a bad idea to tie yourself too strongly to any single language.

Conversely it's a bad idea to spread yourself thin in multiple languages but master of none.

Having said that, I'm pretty much tied to Java since 2000 and haven't seen anything wrong... yet. In fact, I'm determined to get better in Java everyday (memory model, JVM, concurrency, better design, etc).

Side note: I'm also learning pure "modern" JS just because there's no choice on the client-side.

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

#266
post #238

Earlier quoted context omitted.

Interesting. On Microsoft's own site they have http://support.microsoft.com/kb/93362 which does not list 4.0. But I found several references claiming that they did achieve C2 certification with service pack 6 in early 2000. My memory had that as a British certification that they claimed was equivalent, but Google is not turning up anything that supports my memory. However that said, by the time they got that many ser…

Interesting. On Microsoft's own site they have http://support.microsoft.com/kb/93362 which does not list 4.0. I see 4.0 listed on the page. It's right at the bottom -- twice.

Yes, they list the advice in the article as applying to NT 4.0. And the advice on access controls does apply there.

But the only sentences stating that specific versions have actually received C2 type certifications are in the summary. And the statement there is that 3.5 was certified as of 1995 in the USA, and 3.5.1 was given a E3/F-C2 rating in the UK. Nowhere in that article does it say that any version of 4.0 ever received C2 certification.

If you think I'm missing something, please quote directly from the relevant section of the article.

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

#267
post #256

Earlier quoted context omitted.

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'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. Common things such as access an undefined variable or property or trying to call a method of a null object would be detected by most static type checking algorithms.

> Common things such as access an undefined variable

That does not require static typing, unless you're developing in elisp maybe.

> trying to call a method of a null object

Unless there's support from the type system, that one only works on very short code spans within the same scope, which is the least useful it can be (as opposed to type inference which is most useful locally).

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

#268
post #72

Earlier quoted context omitted.

"wingspan" * 7 is also gramatically correct JavaScript, but evaluates to NaN and almost certainly isn't what you want in your JS program, which is why TypeScript prints a type error (well, warning) if you try to compile it. Having optional variables is similar, but not the same as nullable types, especially when the compiler can't enforce non-nullable-ness. All JS devs are familiar with the annoying error "'null' is…

Yes I see what you mean, it'd be interesting to see what the exact rules around type checking are; especially when dealing with []. The string type for example, always give you a string when indexed, even when incorrect: var s = 'foo'; var l = s['length']; // type of l is `string` I also agree about non-nullable types, and I've found even with TypeScript, having to make sure your vars are defined and not-null is stil…

> var s = 'foo';

> var l = s['length'];

> // type of l is `string`

beg pardon?

    $ js
    js> var s = 'foo';
    js> s['length'];
    3
    js> typeof s['length'];
    number

    $ node
    > var s = 'foo';
    undefined
    > s['length'];
    3
    > typeof s['length'];
    'number'

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

#269
post #220

Earlier quoted context omitted.

> Would you have been happier with that? Yes. Google (and others) need to stop releasing half-baked products. You release something half-baked, even if it gets up to speed down the road, people will still have perceptions of it being half-baked. The above exchange is typical.

I heard a kid complaining about Java being slow yesterday. People remember their first experiences for a long, long time after they stop being true.

Well, Java is slow. The JVM startup times are what people notice.

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

#270
post #4

Say what you want about whether this is a good idea or not, it is clear at least part of MS is really serious about open source. * TypeScript is under the Apache 2.0 license [1] * Source is available via git on Codeplex [2] * Installation is as easy as npm install -g typescript [3] Extra bonus coolness: They've provided an online playground like jsfiddle! [4]. [1] http://typescript.codeplex.com/license [2] http://typ…

This looks excellent a nice restrained effort. Hasn't fallen into the trap that ActionScript3 did with too much ceremony, and its nice to see a syntactic super-setting approach rather than Dart's. Now what I'd like to see in Javascripts evolution (non backwards compatible): * Subract: Removing parts of the language - let crockford free to rip out the bad parts. * Enhance: Bring in some more taste of Scheme. * Replace…

new scoping for `var`? Like the block-scoped `let`?
Post reply on HN