Live data from Hacker News

TypeScript: a language for application-scale JavaScript development

typescriptlang.org

201–210 of 316 posts

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

#201
post #186

Earlier quoted context omitted.

that's the feature i'm most surprised they didn't add. coffeescript already does it, for instance.

I'm getting the impression that TS is avoiding making too many dramatic changes to JS. Functions that return undefined in vanilla JS would suddenly return whatever happened to be the last statement; likely leading to unexpected behavior.

i wonder how hard it would be for their compiler to catch the opposite case, then - a program using the return value of a function without a return statement. i think that was my most common bug when i was doing javascript programming, because all the other languages i was using at the time had implicit returns.

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

#202
I think javascript is awesome enough so it doesn't need any language improvements. The only improvement over javascript is coffeescript and it's just because its syntax nothing more else. take a look at this video from google i/o: http://goo.gl/BGvAS

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

#204

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.

I don't know, ECMAScript 6 looks a lot like Coffeescript, and ECMAScript 6 modules look a lot like Node modules.

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

#205

Earlier quoted context omitted.

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

Is that not generalizing as well? I'm one that doesn't. But then, you probably don't know me.

Critical difference is that pacomerh is speaking about the JS developers s/he knows while Camus had no such qualification.

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

#206

Earlier quoted context omitted.

I've done quite a lot of JavaScript development, enough that I guess I'm a "JavaScript developer" (though thankfully that isn't my current day to day job) and I hate it. So now you know of at least one. I agree with everything camus said. Yes JavaScript has some cool stuff in it, but taken as a whole it is a pretty shitty language. This has less to do with the creation of JavaScript than it does the practical reality…

What are the problems with Javascript you speak of? The libraries hiding you from terrible bits, at least the ones I use, have to do with the DOM and not with Javascript.

Variable scoping, unavoidable global namespace pollution, === vs == insanity, etc.

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

#207
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…

I'm not sure function level scope over block level is a bad thing. It makes it more Lisp-y. And if you want block level scope, it's about as easy as (in CoffeeScript):

    do ->
        ... local variables right here ...

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

#208

Earlier quoted context omitted.

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

Is that not generalizing as well? I'm one that doesn't. But then, you probably don't know me.

Yeah, "I know many" refers to a group of people I know, so I'm not generalizing. It's like that silly quote from the Anchorman '60 percent of the time, it works every time'.

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

#209
Like someone else commented in the TC article about Typescript, this Resig quote, changing "Google" for "Microsoft" is relevant:

  "Why is [Microsoft] putting time and effort into 
  changing JavaScript when the DOM is what needs fixing?"
https://twitter.com/jeresig/status/124114331616026624

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

#210

Earlier quoted context omitted.

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…

Roughly the same story here. At the risk of sounding like a fanboy, I feel that while most tech BigCos (e.g. Google, Apple) have become more evil over time, MS has actually become less evil, to the point that using their tech (and some major tech at that) is relatively free of any lock-in risk. TypeScript seems very much in line with this trend, and I love it. This is exactly what I wanted - JavaScript but with decen…

Corporate ethic law:

How evil a company is is directly proportional to the percentage of marketshare it has.

Post reply on HN