3 ms·
for my use case (web dev) ts is fast enough. but i do miss the ocaml compile times! it's mainly the lack of ad-hoc polymorphism that makes ocaml feel a bit clu
by joseferben 2y ago
for my use case (web dev) ts is fast enough. but i do miss the ocaml compile times!
it's mainly the lack of ad-hoc polymorphism that makes ocaml feel a bit clunky to me at times. but structural typing sure would be nice.
i used to avoid typescript because of similar soundness issues. but in the context of web dev this weird type system that evolved from adding types to javascript turned out to be so nice to use. it's bonkers because on paper it shouldn't be this nice haha.
- hajile 2y agoOcaml messed up with their operators. StandardML had a better approach and I hope a future version adds module typeclasses (to help limit the type soup we see in Haskell). As I wrote elsewhere in this thread, TS makes it incredibly easy to unintentionally make megamorphic functions that don’t have any inline cache and don’t get optimized at all. You think you’re writing efficient, DRY code, but it’s really just dog slow because you’ve neutered the JIT.
- nequo 2y ago> Ocaml messed up with their operators. ... I hope a future version adds module typeclasses Do you mean modular implicits?[1] The original paper was published in 2014. There's an internship report from 2023 that summarizes the design and implementation issues: https://modular-implicits.github.io/report.pdf https://modular-implicits.github.io/report.pdf [1] https://arxiv.org/abs/1512.01895 https://arxiv.org/abs/1512.01895
- hajile 2y agohttps://www.cs.cmu.edu/%7Erwh/papers/mtc/short.pdf https://www.cs.cmu.edu/%7Erwh/papers/mtc/short.pdf I believe modular implicits and modular typeclasses are similar and aim to solve the same issues, but they are not quite the same.