Hacker News new | past | comments | ask | show | jobs | submit login

It would be cool if someone could translate this into Typescript or the like, I think it would make it a lot more readable.



TypeScript is much less readable than Haskell and OCaml, but you can easily find translations to TypeScript such as https://github.com/skeate/lambdata.


> TypeScript is much less readable than Haskell and OCaml

That's like saying that Norwegian is much less readable than Italian. It is in the eye of the beholder. They can both express the same concepts but which one is more readable depends on which one you already know.


> They can both express the same concepts

Only in the turing tarpit sense. Out of the box, they have very different capabilities. For example:

Higher-kinded types: easy in Haskell, hard in OCaml, mostly impossible in Typescript.

First-class modules: OCaml has them, Typescript can sort of simulate them with extraordinarily unsafe prototype mangling stuff that you should never ever use, impossible in Haskell

Open variants: Easy in OCaml and Typescript, hard in Haskell


Using this to push Brainfuck at work




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: