3 ms·
Again, I have nothing against type systems. As you pointed out some languages make FP easier than others. C++ and Java's type system, from which TS's type syste
by tacotacotaco 5y ago
Again, I have nothing against type systems. As you pointed out some languages make FP easier than others. C++ and Java's type system, from which TS's type system descends, are not FP languages. You _can_ write functionally but they do not afford much ease.
Intellisense does make code easier to write, good code and bad code. Yes, in all languages. My concern is that every colleague I have spoken with about TS conflates this ease of writing code with better code. It's not. They are still writing highly coupled, imperative code but now with types.
Garren pointed out in another comment the book "Domain Modeling Made Functional" which I have read and have recommended to several other devs. It provides a great example of using type system effectively. While TS's type system isn't quite the same as F# I think a good portion of this book still applies, both types and composition. JS will be getting a pipeline operator and pattern matching in the near future. I expect TS will be updated to support them. This makes FP more relevant.