News for hackers. Stuff that matters.
Re:Announcing TypeScript 2.0 by sotojuan on Thursday September 22, 2016 @03:53PM (#12559782)
It's interesting that TypeScript often gets lumped into "OOP" when a few functional projects like RxJS and Cycle use it. Are their codebases also OOP?
Re:Announcing TypeScript 2.0 by addicted on Thursday September 22, 2016 @04:38PM (#12560168)
I think typescript development is driven more by functional languages, than OOP languages.

However, they do provide some syntactic sugar for OOP, which is useful if you have a JS codebase that is using OOP, because if nothing else, it provides a standardized method of creating objects and classes.

Unfortunately, because most devs are comfortable only with OOP and since typescript is amongst the easiest ways to do OOP in JS, a lot of Typescript code in the wild tends to be OOP heavy.

Re:Announcing TypeScript 2.0 by FrancoDiaz on Thursday September 22, 2016 @05:19PM (#12560456)
The Typescript compiler (written in Typescript) uses no classes.
Re:Announcing TypeScript 2.0 by bsimpson on Thursday September 22, 2016 @04:10PM (#12559923)
Actually, yes, TypeScript uses OOP patterns like classes and interfaces:

https://github.com/ReactiveX/rxjs/blob/master/src/Observable...

But they also use the pipeline operator (::) to chain together methods in a way that's effectively functional.

Re:Announcing TypeScript 2.0 by sotojuan on Thursday September 22, 2016 @04:15PM (#12559965)
Interesting! More interesting is that apparently the TS compiler itself uses no classes.

I just think jeremiep is conflating static typing with Java-style OOP and "design patterns".

Re:Announcing TypeScript 2.0 by qwertyuiop924 on Thursday September 22, 2016 @05:37PM (#12560560)
TS has some functional leanings, but there are probably a good many users from enterpriseland who see the "class" keyword, and have their eyes glaze over with the assumption that they already know everything, as the continue to create monstrosities in the name of best practices.

A little common sense goes a long way.