Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Angular is a mess but typescript is alive and kicking on its own, even with react.

Personally I'm one of the apparently rare breeds that hate angular but loves typescript. I wish there were more of us.

They're really in different realms and please don't make them part of the same whole. Typescript is a transpiler but the transforms it does are designed to mimic accepted JavaScript idioms.

When I'm debugging typescript it makes sense, it looks almost like JavaScript written by somebody that knows what they're doing.

Contrast that to Babel, Closure compiler, and countless others that produce "JavaScript" that reads more like assembler.

Typescript is easy to make back into human readable JS and it's equally easy to slowly transform your JavaScript into typescript.

It's the most forward and backward compatible language transformer I've ran across so I don't appreciate you shitting on it :)



I agree 100%.

TypeScript is an invaluable, mature technology that provides large productivity boosts to any team that maintains a mid-sized code base.

It plays extremely well with React too, and it's benefits are independent of the tech stack. If you are used to typed components/templates, you will NEVER want to go back.

I would argue that is more important to have static typing in the front-end compared to the back-end in a web-application context. There is more state, lot's of shared entities and unit tests are expensive to write and maintain.


> There is more state, lot's of shared entities and unit tests are expensive to write and maintain.

Good point, but only to an extent: Unit tests boilerplate in dynamic languages that is redundant with static typing is only a (minor) subset of unit tests that you should be writing for your code. Static typing is not an excuse to skip unit tests altogether. I've unfortunately met people claiming exactly that...


In 2014 I used Typescript on a four month long project. I liked it alot compared to using just JS, however compiling was slow.

I retried using Typescript 1 month ago. Compiling took 6-7 seconds for about 8 files. I could not find a solution and gave up using TS. I hope that's just me doing not good enough research.


Definitely something up with your environment. We compile hundreds of .ts files at my job each build and it only takes a few seconds


Must be something with your setup, tsc is known to be quite fast. Maybe try using it with the watcher? "tsc -w" and you'll never need to compile more than one file at a time.


Typescript with React is necessary for me. I feel like it highly increases my productivity when coding, and it makes it easy to refactor the code.

Plus you can do some cool things like Component inheritance.

I've never tried Flow, but I guess it's practically the same.


I want to move on from Jquery... Have been learning C# on the back end for the past year and a bit, but now it's time to do the front end.

Looking at both A1 and A2 has confused me, so might just try React and see if that is more compatible with my ageing me. :) Nevertheless, I also really like the looks of Typescript. Could your possibly recommend a(n opinionated) way to get started with the two?


I came from C# WPF/Winforms and have to say that Angular 2 is more familiar to me than react.

Of course the whole web stack is a new thing. Angular makes web app development much more productive.


Interesting; perhaps I ought to learn both, at least to a certain minimum level - to assess where I'm at with each as such.


I have heard the same from many people. Angular takes the web and makes it look like traditional event driven UI. This is not a bad thing at all, it's how UI works in everything that isn't web.

React is a lot less abstraction and feels more natural to people that started out making UI with plain HTML.

Each has its merits but Angular uses way too much magic for my taste to make the web seem like something it's not. Much like a client side re-imagination of webforms



Thanks - that looks good, will check it out.


It's interesting how OP says people are moving towards more functional-style Javascript, but also dismisses statically typed Javascript. The two work really well together.


(They don't understand TypeScript. The argument is as stale as the 0.8 release)


Oh come on, that's a bit glib. I'm experienced with typed languages, it is possible to have a credible, critical opinion about TypeScript.


I'm convinced functional style is a fad and nothing will change my mind. The style has been around for forever and there's a good reason most languages are still OOP.

We're in the phase of the hype loop where everyone assumes language designers from 15 years ago are idiots. In another few years everyone will be talking about the revival of OOP


Functional style programming is not a fad so much as a different taste. Not everyone will always have the same tastes. It's like peanut butter and chocolate: you can love only one or the other, you can also love both or know that each has different strengths for different needs (projects/desserts).


I can understand if people think it's a fad, but I would expect people who _do_ like it to also like TypeScript :)

That said, if someone thinks language designers from the past are idiots, then they also shouldn't like functional programming, as it's at least as old.


> nothing will change my mind

you seem a bit committed. is this an emotional thing?

> there's a good reason most...

is there? is this reason related to languages themselves or their use? does it necessarily imply anything specific about "functional style"?


> nothing will change my mind

This is a HUGE red flag if you're seeking employment long-term in the tech sector.


I'm a huge fan of Typescript and not a big fan of Angular. I'm in the same boat as you.

Anders Hejlsberg has done a brilliant thing.

I'm also always a bit sad that Knockout seems to be overlooked a lot. It is not as opinionated but often times exactly the right tool for the job.


I feel like Typescript is the only thing that will stick around for sure in the coming years.

Frankly, I don't know if I can say the same about all the other libraries/frameworks/etc since every month there is something new that's supposed to make all the other competing tools part of ancient history.


The best thing about Typescript is that if it dies one day you can compile down one last time to pure, human readable, JS and toss it out.

There's literally no reason to not use typescript


I haven't dabbled too much with it, but as still an outsider, Typescript + React honestly seems like a great fit especially to make it even more approachable.

What I like most with React over Angular is that it seems like it cuts to the core of the problem I'm actually trying to solve here. It just feels like a lean, clean, proper solution to the main issue at hand. (this of course helps with dev adoption too because it's easier to find people knowledgeable in lean frameworks, or at worst much quicker to train them)


I agree also.

I've been using TypeScript with React now for about six months - prior to that I was working on a large React/Redux app written in ES6 using Babel.

In my experience, I have seen a significant increase in my productivity after embracing TypeScript. With the static type support I am fixing/avoiding more errors at 'authoring' time due to intellisense and the VSCode editor flagging what will be compile errors. I am able to refactor across files with a lot less fear.

The advanced types in TS (specifically discriminated unions) make Redux actions and reducer code a lot more maintainable.

Overall I'm very pleased with the transition to TS. I spent time learning Elm last year and simply fell in love with that development experience. For reasons out of my control I cannot use it in production but with my current TS+React approach I can at least get close to what Elm offers.


I've never seen anyone conflate TypeScript with angular before GP's comment.

(And I happen to agree with him on angular being confusing and not well designed)


Unfortunately I've met some devs new to SPA stuff and they believe it's either react/flow or angular/typescript. They're being promoted this way in the intro docs on both sides.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: