Hacker News new | ask | show | jobs
by ZenoArrow 3466 days ago
>"That looks interesting. Is there an analogous Haskell or OCaml feature to F#'s active patterns?"

Based on a quick web search, the equivalent of F#'s active patterns in Haskell appears to be view patterns...

https://ghc.haskell.org/trac/ghc/wiki/ViewPatterns

...and the closest I found for OCaml was polymorphic variants...

https://realworldocaml.org/v1/en/html/variants.html

>"I know of some research in gradual typing, but I've never seen it in any mainstream languages."

When you say gradual typing, do you mean optional type hinting like you can find in Python 3, or something else?

https://docs.python.org/3/library/typing.html

1 comments

I believe the term is gradual typing: https://en.wikipedia.org/wiki/Gradual_typing

Thanks for the links. I didn't know about python's typing. It looks like a fairly recent addition.