4 ms·
If PureScript is Haskell, TypeScript is ML Lately, TypeScript has become more scalable across existing npm libraries and also introduced new advanced types. I
by truth_seeker 7y ago
If PureScript is Haskell, TypeScript is ML
Lately, TypeScript has become more scalable across existing
npm libraries and also introduced new advanced types.
It looks like Microsoft guys learned a lot from C# and F# type system and feedback from their users
https://www.typescriptlang.org/docs/handbook/advanced-types.html https://www.typescriptlang.org/docs/handbook/advanced-types....
- wtetzner 7y ago> If PureScript is Haskell, TypeScript is ML If you want ML, why not OCaml with js_of_ocaml or BuckleScript?
- dwhitney 7y agoOnce you get a taste for higher kinded types (aka: type constructors), there is no going back! PureScript is fantastic language with an active an open community. Best place to start (IMHO) is https://github.com/lumihq/purescript-react-basic https://github.com/lumihq/purescript-react-basic You can pretty quickly get a react app up and running
- truth_seeker 7y agoDon't get me wrong. I love PureScript and HKT but the fact that it requires complete buyout to Purescript ecosystem overwhelms my team members and becomes a hard sell. To build a PS layer on top existing JS libraries isn't straight forward. Now that they introduced so many breaking changes, it will take time for other PS libraries to catch up. May be I might go back to PS when 1.0 release happens and I hope many things are stable including libraries which I need in day to day full stack development. Typescript in the last couple of years introduced a nice way to compose types and ways to get rid of many other common JS gotchas. They have type definitions for almost all the usable npm libraries, which helps you jump-start the development.
- ff_ 7y agoIt really didn't take long for libraries to catch up, we already released a Package Set compatible with 0.13, two days after the release. That's a set of the most used ~200 libraries in the ecosystem. https://github.com/purescript/package-sets/releases/tag/psc-0.13.0-20190531 https://github.com/purescript/package-sets/releases/tag/psc-...
- dwhitney 7y agoYeah I agree with @ff_57 here - the "breaking changes" really aren't a big deal, and don't effect many libraries. With the existing tool chain you will know immediately if a library has any of these incompatibilities, and if it does, the fix is likely some white space issue, which is trivial to fix.
- jahewson 7y agoI think that's a decent analogy, to an extent. Of course there's always Reason, which is actually ML. https://reasonml.github.io https://reasonml.github.io
- k__ 7y agoI had the impression: ClojureScript == Lisp PureScript == Haskell Reason == ML TypeScript == C#
- systems 7y agoIsn't it BuckleScript == ML
- k__ 7y agoBuckleScript is a OCaml&Reason to JavaScript compiler.
- truth_seeker 7y agoYes. I agree. It was started like this. But now Typescript 3.5 is also influenced by F# which is close to ML. Just look at those advance types and their allowed composition which Typescript supports in its latest release and you will understand.
- k__ 7y agoYes, feels kinda overloaded to me...
- halfmatthalfcat 7y agoAnders Hejlsberg, who created C#, has been heading up the Typescript team at Microsoft.
- the_duke 7y agoThis comparison is flawed, imo. Typescript is Javascript with a relatively advanced type system (mapped types, type guards, etc) on top, but is still very much constrained by Javascript fundamentals and syntax. The type system evolution was primarily driven by the need to create valid typings for the existing JS ecosystem, and this noticeably shapes the capabilities. This is the right choice for the language, but I can't see how it resembles the ML family much.