Live data from Hacker News

TypeScript: a language for application-scale JavaScript development

typescriptlang.org

281–290 of 316 posts

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

#281

Earlier quoted context omitted.

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.

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

Knowing Javascript, GWT is a win.

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

#282

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…

> That said, ASP.NET MVC is a misguided and overrated Rails ripoff, IMHO.

I completely disagree. ASP MVC may be inspired by rails, and C# inspired by java, and MS may be loathe to admit ether of those sources of inspiration.

however, ASP MVC on C# is great. Maybe because MS stole from the best.

IMHO.

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

#283

Earlier quoted context omitted.

The language itself is broken, especially when it comes to equality, type coercion, `arguments`, and Date processing.

Equality (and that portion of type coercion) is pretty much solved by using === and the rest of type coercion is solved by only using + when both sides are numbers or strings. I don't see how that gets as much ire as it does

> I don't see how that gets as much ire as it does

Because it's the straw-man.

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

#284

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.

The problems should be blatantly obvious to developers who have used languages other than JavaScript and PHP (which both have many of the same flaws).

Once you've studied and used languages like C, C++, Python, Java, C#, Haskell, Scheme, Erlang and Standard ML, you'll see what we mean when we say that JavaScript is a very flawed language. Pick any of its features, and compare that feature to the equivalent feature in the other languages. JavaScript's approach will generally be the worst of all of them.

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

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

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

Of these developers, how many of them have any real experience with languages like C++, Java, C#, Scheme, Haskell and Erlang?

It's easy to find JavaScript developers who love JavaScript solely because it's the only language they know. But once you start dealing with JavaScript developers who have a wider understanding of what various programming languages offer, the problems with JavaScript become much more obvious, and the hatred for JavaScript becomes immense.

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

#286
post #239

Earlier quoted context omitted.

Imagine if Linus Torvalds shared your point of view.

We'd have a rocking *BSD community now, with all that Linux mindshare going there. Nice.

Nah, we'd have another POSIX OS, only worse than Linux (probably). Plus they attract different kinds of mindshare.

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

#287

Earlier quoted context omitted.

Trust me when I say that if you use .NET, you're always going to be stuck with Microsoft. Mono, the only other somewhat viable implementation of the CLR, just doesn't really cut it in practice -- at least for ASP.NET.

hmm, mind sharing why? My limited Mono experience was that getting a simple ASP.NET application running on a Linux VPS was, without prior Mono experience, one hours' work. I was pretty impressed by this.

As meanguy pointed out, the Mono team lost Novell's backing -- arguably, they never had it in the first place. Xamarin is now focused entirely on mobile, to the detriment of the core CLR implementation and web.

Not that I blame them in the least. I've been a huge fan of Miguel for years, and they're doing great things in the mobile space. I just can't in good conscience invest heavily in Mono knowing that it's essentially at a dead end -- particularly when other much more attractive web technologies have been released since .NET's inception.

The reality is that Microsoft never really wanted to build a cross-platform CLR. They wanted a great Java-like runtime that only works on Windows. If that matches up with your goals, then by all means use .NET, but be prepared for a tough slog later on if you want to escape Windows.

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

#288

Earlier quoted context omitted.

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'

Please read the whole post for context. I am talking about the type system in TypeScript thinking that `l` is a string (which you can find out, for instance, by hovering over the `var` keyword in Visual Studio), when in fact, as you pointed out, it is a number. I assume this is because TypeScript caters to the most common case of indexing a string to obtain a single character (another string, basically).

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

#289

Earlier quoted context omitted.

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'

[deleted]

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

#290

Earlier quoted context omitted.

The language support in VS is really great, and getting better with each release. Go to definition, code outlining, folding, type information on hover, intellisense; all these make writing code much less easier and error prone, especially if you are used to writing in a language like C# or Java in a good IDE.

But does VS run on Mac OS X or Linux? Didn't think so.

Ah right, misread your post. I was just commenting in general on the VS support, you are right that it would not be as nice on other platforms.
Post reply on HN