8 ms·
> Typescript aims to model a strongly typed, OPP language That's a rather puzzling statement, to be honest. Strong type system is explicitly one of the non-goa
by iaml 7y ago
> Typescript aims to model a strongly typed, OPP language
That's a rather puzzling statement, to be honest. Strong type system is explicitly one of the non-goals[0]. I write typescript code everyday and most of it is functional. Things like fp-ts[1] make it even more enjoyable.
[0] https://github.com/Microsoft/TypeScript/wiki/TypeScript-Design-Goals https://github.com/Microsoft/TypeScript/wiki/TypeScript-Desi...
[1] https://github.com/gcanti/fp-ts https://github.com/gcanti/fp-ts
- orange8 7y agoAm comfortable using both OOP and functional styles, though I do enjoy the flexibility and terseness that can be produced from the functional approach. What I meant by the comment is that when using TS, I just find it more easy and natural to go with the proper OOP approach. I think the very existence of a separate library to enable a more functional style in TS proves this goal has not been met yet.
- iaml 7y agoFunctional languages usually have extensive standard library, while js does not. Adding it is not really a goal of ts.