Live data from Hacker News

I Was Wrong About TypeScript

triplet.fi

181–190 of 194 posts

Re: I Was Wrong About TypeScript

#181
post #140

Earlier quoted context omitted.

I'd love to know what you love about coffee? Is it the syntax? I am working on extending the Typescript parser to support coffee like syntax.

"Love" is a strong word. The syntax is nicer than JavaScript, and I prefer to use it when possible. Though granted JS is making strides and the difference isn't as great as it was 5 years ago. You're part of a MS project doing this, or you're doing it on your own?

Doing it on my own. I really like how I can quickly hack with coffee but I also love the typescript intellisense magic so trying to make a hybrid.

Re: I Was Wrong About TypeScript

#182
post #174

Earlier quoted context omitted.

That's a little harsh. It was an MVVM framework along the same lines as backbone, ember 1.0, knockout, and pretty much every other framework of the day, plus a lot of extra functionality. It's not really google's fault that MVVM has limitations.

I don't think his criticism is too harsh. Two of the main problems I had with angular - the template syntax and the way the digest cycle worked, both contributed to its scaling factor. The template syntax meant you would always wonder what a parameter meant when passed to a directive. Essentially, all parameters passed to a directive were strings, but angular would parse some strings to mean "the property of a parent…

Great answer, I feel the same way. Let's not forget the documentation, way too abstract. Probably the result of an overengineered framework.

Sadly I'm stuck having to deal with it, and I can honestly say I hate it and it makes me want to cry. Might have to do with the way it was used, though. I find myself having to write a directive each time I have to populate a fucking select2.

Re: I Was Wrong About TypeScript

#183

Earlier quoted context omitted.

I remember hearing the same argument in the early 80s for the benefit of C vs Assembly. And it actually was a good argument. A lot of people, myself included, learned "real programming" (ie assembly) by using C as training wheels. But a funny thing happened on the way to the forum - C became real programming and nobody remembered or learned assembly - myself included. Then the same thing happened ten years later with…

So it sounds like everything worked out.

It did, and it will. My point is that just like with these "legacy" languages, the next generation of TypeScript developers are no more likely to "drop down into JavaScript" as a C developer is to "drop down into assembly". So our development tools and debuggers must be really solid at the language level that we code in. And just like I skipped the "transpiling" phase of C++, I'll probably skip the transpiling phase of TypeScript, and wait for the tooling and runtime to be more mature.

Re: I Was Wrong About TypeScript

#184

> I have written tests in TypeScript, compiled to JavaScript, and then used Mocha, for example, to run tests. I would like to hear your thoughts on this. We use ts-node to run our mocha tests without ever compiling: https://github.com/TypeStrong/ts-node

Interesting solution, thank you for the link!

Re: I Was Wrong About TypeScript

#185
post #113

> Web Forms abstracted away the core technologies of the Web with mixed results Understatement of the century.

Hey, I just tried to be polite.. but yes, you're absolutely right, understatement of the century!

Re: I Was Wrong About TypeScript

#186
post #16

I recently started learning TS after reading a previous HN post on it ( https://medium.com/@basarat/typescript-won-a4e0dfde4b08 ) and listening to the JS Jabber episode with Anders Hejlsberg himself explaining the benefits ( https://devchat.tv/js-jabber/209-jsj-typescript-with-anders-... ). These two (plus knowing that Angular 2.0 is going to be much easier with TX) totally sold me on learning it. I'm in the middle o…

Coding/language support is very comparable between WebStorm and VS Code. WebStorm is a much larger and full-featured IDE, though. Most people won't use most features, but I found that I missed one or two things in VS Code and had to go back to WebStorm.

I'm still debating between the two. I do miss the code corrections (like the suggestions to add module imports) when using VS Code. That said, I'm very impressed with the progress that VS Code has made in such a short time.

Re: I Was Wrong About TypeScript

#187

Earlier quoted context omitted.

The two things coming in 2.0 that most excite me are - moving types to npm (despite the great work of Blake on typings, managing type definitions is still out of band) - npm install @types/somelib will be great. - AST transforms, which will open up some interesting options for bundling and optimizations, sort of like babel's plugin ecosystem.

Could you give links about moving types to npm? Are there any issues in a tracker or a blog?

Posted today https://blogs.msdn.microsoft.com/typescript/2016/06/15/the-f...

Re: I Was Wrong About TypeScript

#188
I don't see any reason to use TypeScript over Babel. I'm a big supporter of Microsoft technologies, especially since I started out my career developing web applications in the late 90's with Classic ASP. Then adopting .NET in 2000 and working in that space solely until 2011 at which point I jumped shipped over to the isomorphic JavaScript world of Node.js and Angular.

Over the past few years I've really taken to Node.js and Angular and when the Angular team told the world it choose TypeScript as its main language of choice to build out the new version of Angular 2.0, I had to seriously consider adopting it as well for Angular development going forward. If it's good enough for the Google team to use for Angular 2.0 then it should be good enough for me to use as well. Then during my research into the technology I ran across Babel.

After spending decent amount of time reading up on blog posts defending, promoting or choosing one of the two technologies over the other and alert spending countless hours building applications with each of them in order to get a real good understanding on how each feels to work with. I came to the conclusion that Babel is the only library I need to use on all of my projects and for good reason.

Babel provides the development world a tool that allows them the ability to use tomorrow's features and tools today and within mostly ever browser that's in use in some form commercially or professionally. Having the ability to use features in future ECMAScript standards planned for down the road today, makes perfect sense for me to use today if there will not be any side effects to doing so.

These features help me write less code, cleaner code and more robust code, just by using a library that handles all of the heavy work behind the scenes when it's time to transpile all of my futuristic code into today's boring standard for browser consumption.

Yes TypeScript can provide the end user a large portion of the features and functionality I am referring to with the Babel library but Babel provides the end user a lot more than TypeScript can and it will always be able to provide that and more going into the future as well.

Re: I Was Wrong About TypeScript

#189
post #51

Anyone have feedback on using Flow vs TypeScript?

I found it easier to get started with Flow, but I eventually moved to TypeScript because it just has more mindshare, and isn't worse by any measure I care about.

I found it much easier to find tutorials, typings, and so on, for TypeScript. Editor support also seems to be a bit better (especially with VSCode), although the Flow-centered Nucleus plugin for Atom is pretty nice.

Re: I Was Wrong About TypeScript

#190
post #91

It seems like people are trying to use types as a substitute for tests and a way to protect themselves from unintended mutations. But if you write tests already and use immutable data structures, what benefits does TS bring to people whose background isn't in strongly typed languages?

It's not just javascript with types. The language is written in a way that makes it much easier for machines to understand your code. I'm not talking about just tests and linting. Check out some typescript tooling videos, this one was shown at an angular 2 conference but you don't need to know any angular to watch it: https://www.youtube.com/watch?v=e3djIqAGqZo

I find it funny that a lot of reasons boil down to "it's easier for the machine" -- developer happiness (which most of you mentioned, too!) through autocompletion and less failures seem to be a better selling point :)
Post reply on HN