Live data from Hacker News

TypeScript Seals My Penchant for JavaScript

cycligent.com

51–60 of 133 posts

Re: TypeScript Seals My Penchant for JavaScript

#51
post #46
post #44

I love JS/ES2016 how it is, I seriosuly don't see the advantage of typescript except maybe for a gigantic application

Am I missing something? None of the major browsers even support ES2016 yet do they? https://en.wikipedia.org/wiki/ECMAScript#Implementations

yea, babel, as exception replied

Re: TypeScript Seals My Penchant for JavaScript

#52
post #49

Earlier quoted context omitted.

Oh come on, you're not even trying. He means, the type checking and refactoring capabilities that you want to have in a large team that relatively quickly changes composition. I.e. the kinds of teams you often find in enterprises. I doubt Google doesn't use any of the type checking and refactoring tools that come with all Java IDEs out there. You think they rename Java methods with command-line search&replace just to…

>* Oh come on, you're not even trying. He means, the type checking and refactoring capabilities that you want to have in a large team that relatively quickly changes composition. I.e. the kinds of teams you often find in enterprises.* I rarely find such large teams in enterprises. What I usually find is ad-hoc projects, some in VB6, some targeting IE6 in 2016 still, others in J2EE with "enterprise" application server…

> the same persons work in the same IT deps for decades...

Guess I've found my solution to my persistent angst over the repeated 'old geeks are screwed' stories around here!

Re: TypeScript Seals My Penchant for JavaScript

#53

Since TS is superset of JS it has all it's flaws - we need different lang compiled to JS (like Dart) not a mockup.

Just because a language has a feature does not mean you need to use it. We use JavaScript, but in 90%+ of our codebase we use it without 'this', without prototypes, without classes, and without other ugly parts.

You also don't use integers!

Re: TypeScript Seals My Penchant for JavaScript

#54
post #20

Earlier quoted context omitted.

It is just the second coming of Mozilla XUL, just that this generation hyping Electron was still on their diapers, so they haven't seen it coming and going away without living any trace of it besides Firefox and Thunderbird.

As someone who tried out XUL back when they released XULRunner, in 2006, I don't agree at all; XUL was this weird and poorly document XML language which you could only use for desktop apps (since no other browser besides Mozilla's supported it). Also, JS on browsers was much more limited back then, so code reuse between the site and the desktop app was much less useful. Meanwhile, Electron and their ilk use all the s…

From the user experience point of view they are quite similar.

Back then I could usually guess when some "desktop" apps were written in XUL, given their performance or lacking OS integration.

Same thing now with Electron apps.

Re: TypeScript Seals My Penchant for JavaScript

#55
post #20

Earlier quoted context omitted.

It is just the second coming of Mozilla XUL, just that this generation hyping Electron was still on their diapers, so they haven't seen it coming and going away without living any trace of it besides Firefox and Thunderbird.

And thank God for the second coming! Jesus, it's about time. Electron is much better than XUL along many dimensions. At least it doesn't force you to use XML external entities in DTD files for text localization. [1] You just call the Electron localization function! ;) [2] [1] https://developer.mozilla.org/en-US/docs/Mozilla/Tech/XUL/Tu... [2] https://en.wikipedia.org/wiki/Electron_localization_function

Not for the user experience.

Re: TypeScript Seals My Penchant for JavaScript

#56
post #27

I simply don't understand how can someone like javascript (or anything derived from it) when there are so many much better languages around. Can someone state some advantages for web development for example compared to ruby, python, or clojure? All I see is a slow tangled mess of dependencies and broken libraries with a package manager which lets you change already released modules and a language which is even more p…

Best thing about JavaScript is the speed of development. Once you master it, all other languages & ecosystems feel verbose, archaic.

Modern JS (ES2015+) combined with a code style (Standard, Airbnb) is beautiful, sometimes more so than Python.

Bad modules isn't a problem inherent to JS. NPM has its faults, but the JS community is the largest, and the fastest moving of all. Everything you need already exists, and it's probably actively maintained, if not accessible for you to submit a PR.

PHP? Lol, no. JS > PHP.

Re: TypeScript Seals My Penchant for JavaScript

#57
post #38

Earlier quoted context omitted.

Enterprise-level capabilities . I know the E-word is taboo here but aren't you people exaggerating a but on the trolling?

"Enterprise-level capabilities" doesn't mean anything still. Google is bigger than most enterprises, and they don't use any "enterprisey" stuff, not even in their Java.

Can people die from code written at Google?

Re: TypeScript Seals My Penchant for JavaScript

#59

Earlier quoted context omitted.

because I enjoy writing pure JS. Typescript feels like Coffeescript, which always felt like a hack to make Rubyists more comfortable. Similarly TS feels like a hack to make C#'ers more comfortable. Ultimately, if you're going to program in JS then get comfortable in JS, rather than trying to make JS more like your favourite language.

You can type absolutely pure JavaScript, change the file extension to .ts and still get some of the benefits of the typescript compiler for absolutely free. That's probably why a lot of people are excited about typescript. It basically is JavaScript, but optionally annotated JavaScript. It's not a new language.

Not when using the billion-dollar-mistake-fixing `--strictNullChecks` flag. :)

Re: TypeScript Seals My Penchant for JavaScript

#60
post #34
post #6

Earlier quoted context omitted.

Well Google already did that with Java and GWT, but it never caught on. I guess TS being a superset of JS itself might be an advantage...otherwise it is still a new language designed for web browser programming unlike Java. I suppose it is a fair question why they didn't just use C#.

> Well Google already did that with Java and GWT, but it never caught on. ClojureScript uses the Closure(sic) compiler from GWT to compile Clojure/Java to JavaScript (not that I defend this technological train wreck). > I suppose it is a fair question why they didn't just use C#. This would have been superb, but I think Microsoft wanted to show that they "get" web developers; just mentioning C# causes the JS pundit g…

There were already open source projects that tried to do this some paid projects, but they never gained traction. Microsoft also had the hind sight of DART and GWT to help point them in the TypeScript direction.
Post reply on HN