Live data from Hacker News

TypeScript Seals My Penchant for JavaScript

cycligent.com

1–10 of 133 posts

Re: TypeScript Seals My Penchant for JavaScript

#2
The most underrated feature of TypeScript is not the language itself, but the transpiler. With the flick of a switch you can support ES3, ES5 and in future ES6 and beyond - without changing your code (not entirely true, but it is possible to write code that transpiles well to all JS standards).

Decoupling your development from the shifting sands of JS support - across multiple browsers and platforms - is a dream come true, and a good enough reason alone to use TS.

Re: TypeScript Seals My Penchant for JavaScript

#3
to save readers the time I've just wasted, here are the two sentences about typescript in this sales pitch for cycligent.js:

"I am able to keep the freedom and expressiveness of JavaScript to which I have become so accustomed while getting enterprise-level type checking and refactoring capabilities. Declaration of objects and interfaces is a dream."

Re: TypeScript Seals My Penchant for JavaScript

#4
post #2

The most underrated feature of TypeScript is not the language itself, but the transpiler. With the flick of a switch you can support ES3, ES5 and in future ES6 and beyond - without changing your code (not entirely true, but it is possible to write code that transpiles well to all JS standards). Decoupling your development from the shifting sands of JS support - across multiple browsers and platforms - is a dream come…

Totally agree. After doing a bunch of code with TypeScript (transpiling to ES5 and ES3), I decided to give Babel a try. It took me awhile to set it up properly with the right presets and plugins. It did a fine job transpiling, but I wondered why people just don't use TypeScript. It's so much easier to use.

Re: TypeScript Seals My Penchant for JavaScript

#5
post #2

The most underrated feature of TypeScript is not the language itself, but the transpiler. With the flick of a switch you can support ES3, ES5 and in future ES6 and beyond - without changing your code (not entirely true, but it is possible to write code that transpiles well to all JS standards). Decoupling your development from the shifting sands of JS support - across multiple browsers and platforms - is a dream come…

But if you're going to transpile, why not transpile from a real language, not a Turing tarpit?

Re: TypeScript Seals My Penchant for JavaScript

#6
post #5
post #2

The most underrated feature of TypeScript is not the language itself, but the transpiler. With the flick of a switch you can support ES3, ES5 and in future ES6 and beyond - without changing your code (not entirely true, but it is possible to write code that transpiles well to all JS standards). Decoupling your development from the shifting sands of JS support - across multiple browsers and platforms - is a dream come…

But if you're going to transpile, why not transpile from a real language, not a Turing tarpit?

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

Re: TypeScript Seals My Penchant for JavaScript

#7
post #3

to save readers the time I've just wasted, here are the two sentences about typescript in this sales pitch for cycligent.js: "I am able to keep the freedom and expressiveness of JavaScript to which I have become so accustomed while getting enterprise-level type checking and refactoring capabilities. Declaration of objects and interfaces is a dream."

I think these reports from the field are worthwhile. The guy is an experienced programmer. I thought it was interesting that he was a hard core Java/C# and hated JavaScript when he had to use it. Then after a couple of years of JavaScript, he fell in love with the expressiveness and ease of coding and chaffed at the restrictions of Java/C#. Then he had to do a large app in JavaScript and hit the point where he it was really painful to refactor and he missed the tools he had in Java and C#. Finding TypeScript was, as Goldilocks said "just right." The tagline of TypeScript is "JavaScript that Scales" for exactly this reason. His journey mirrors mine and probably a lot of others.

I got there from thier other article "Does Electron live up to the hype?"

https://www.cycligent.com/blog/does-electron-live-up-to-the-...

tl;dr - It does

I am not associated with the company. I download and tried Cycligent to see how their Elecron app turned out (I'm a big fan of Electron.) It looks like a decent git client, although it feels like a web app with the dialogs that slide in. I could get used to it. Screen shot:

http://imgur.com/a/y5F5A

Re: TypeScript Seals My Penchant for JavaScript

#8
post #4
post #2

The most underrated feature of TypeScript is not the language itself, but the transpiler. With the flick of a switch you can support ES3, ES5 and in future ES6 and beyond - without changing your code (not entirely true, but it is possible to write code that transpiles well to all JS standards). Decoupling your development from the shifting sands of JS support - across multiple browsers and platforms - is a dream come…

Totally agree. After doing a bunch of code with TypeScript (transpiling to ES5 and ES3), I decided to give Babel a try. It took me awhile to set it up properly with the right presets and plugins. It did a fine job transpiling, but I wondered why people just don't use TypeScript. It's so much easier to use.

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.

Re: TypeScript Seals My Penchant for JavaScript

#9
post #5
post #2

The most underrated feature of TypeScript is not the language itself, but the transpiler. With the flick of a switch you can support ES3, ES5 and in future ES6 and beyond - without changing your code (not entirely true, but it is possible to write code that transpiles well to all JS standards). Decoupling your development from the shifting sands of JS support - across multiple browsers and platforms - is a dream come…

But if you're going to transpile, why not transpile from a real language, not a Turing tarpit?

Because you can paste in your favorite JavaScript code snippets and they work without modification. One can gradually add types to a JavaScript project at a pace of your choosing. I think a more interesting question is why add types when there is Facebook's flow. My answer: because flow doesn't help with the refactoring and other IDE tasks.

Ask HN: If TypeScript is so great, how come all notable ReactJS projects use Babel? https://news.ycombinator.com/item?id=12537614

Re: TypeScript Seals My Penchant for JavaScript

#10
post #4

Earlier quoted context omitted.

Totally agree. After doing a bunch of code with TypeScript (transpiling to ES5 and ES3), I decided to give Babel a try. It took me awhile to set it up properly with the right presets and plugins. It did a fine job transpiling, but I wondered why people just don't use TypeScript. It's so much easier to use.

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.

Some people like types, other people don't. Some people like indenting with 4 spaces, other like 2. I was a die hard 4 space guy until today, when I was debugging a bunch of 2 space code and decided I like it better.
Post reply on HN