Live data from Hacker News

TypeScript Seals My Penchant for JavaScript

cycligent.com

21–30 of 133 posts

Re: TypeScript Seals My Penchant for JavaScript

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

What on Earth is "enterprise-level type checking"?

I thought that too. What a bizarre phrase to apply to a language he clearly loves. Enterprise level type checking normally means supporting pretty much just the concept of "classes" (ala Java) and calling it a day - leaving the developer(s) to take the burden and create all sorts of god awful "design patterns" to work around fundamental flaws in their language of choice.

I know that is not the case with TypeScript. I believe the recent version added support for union types which is going to blow the mind of the naive JavaScript masses, for sure.

Describing any language as "enterprise grade" is rarely a good thing. Wording and phrasing is important.

Re: TypeScript Seals My Penchant for JavaScript

#23
post #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…

From what he wrote, he was writing Java and switched to JavaScript. C# got lambda expressions years before Java, if he wasn't using them, then yes, those languages are very restrictive.

They solved most of the expressiveness problems; at least for me. And Java only got them a year or two ago didn't it?

I use typescript a lot at the moment, I really miss it now when I have to write vanilla js, but it's still not a great language. You still have to think about 'this' a lot, 'this' still causes bugs, in many ways it's over verbose because every property and method call has to be prepended with 'this.'.

Re: TypeScript Seals My Penchant for JavaScript

#24

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.

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.

I have a solution for hardcoded spaces that is sure to blow your mind.

Re: TypeScript Seals My Penchant for JavaScript

#25
post #7

Earlier quoted context omitted.

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…

From what he wrote, he was writing Java and switched to JavaScript. C# got lambda expressions years before Java, if he wasn't using them, then yes, those languages are very restrictive. They solved most of the expressiveness problems; at least for me. And Java only got them a year or two ago didn't it? I use typescript a lot at the moment, I really miss it now when I have to write vanilla js, but it's still not a gre…

yes it's the same language. You don't have to use 'this', prototypes or classes a single time in your program. It's so much saner without all that crap.

Re: TypeScript Seals My Penchant for JavaScript

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

thank you, I went and checked the article anyway and yes, it's not very useful or educated.

Re: TypeScript Seals My Penchant for JavaScript

#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 poorly designed than PHP. Is it just because of node.js and the promise that you can use javascript from database to frontend?

Re: TypeScript Seals My Penchant for JavaScript

#28

Earlier quoted context omitted.

From what he wrote, he was writing Java and switched to JavaScript. C# got lambda expressions years before Java, if he wasn't using them, then yes, those languages are very restrictive. They solved most of the expressiveness problems; at least for me. And Java only got them a year or two ago didn't it? I use typescript a lot at the moment, I really miss it now when I have to write vanilla js, but it's still not a gre…

yes it's the same language. You don't have to use 'this', prototypes or classes a single time in your program. It's so much saner without all that crap.

I agree, if you ignore classes, prototypes and 'this', js makes for an excellent functional language.

Re: TypeScript Seals My Penchant for JavaScript

#29
post #6
post #5

Earlier quoted context omitted.

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

There's also Scala.js, which takes it even further than GWT.

And of course Dart.

Re: TypeScript Seals My Penchant for JavaScript

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

Well you don't have much choice for frontend for one. Typescript offers much stronger typing than Ruby, Python, Clojure and PHP as well.
Post reply on HN