Hacker News new | ask | show | jobs
by lmm 3864 days ago
If you're in for the long haul (say 2+ years) I'd go with scala - it's ultimately a better language with a much more complete and powerful type system than typescript. It's also good to learn at least one functional language to pick up the functional techniques (which are ultimately valuable in any language), so if you've never learnt a functional language before I'd recommend it.

But typescript will get you most of the "quick wins" of type safety and is very easy to migrate to, so it's probably a better choice in the short and medium term (at least in terms of immediate productivity).

1 comments

Thanks for your response :)

I'm more into a long haul so scala sounds pretty cool.

But what just rushed into my mind is that angular 2 will be in typescript so learning scala would only be relevant for server side code. And using two languages when one can handle both doesnt sound quite convicing :/ Would you still recommend scala when I want to work with angular 2 in the near future?

Scala can be very good at interop - I still use Wicket (Java) for my Scala web UIs. And I'm confident that the Scala.js folk will have a good answer for doing UI, whether that ultimately means Angular 2, another existing framework, or a native Scala.js UI framework.

All that said, if you're thoroughly committed to Angular 2 (a mentality I don't really understand - I love Wicket but if an equally OO framework existed in native Scala then I'd use that instead) then using anything other than Typescript is probably an unnecessary risk factor.

There is a functional cousin of Typescript, she is called Funscript (Funscript.info), you may find her interesting ;)