5 ms·
I like functional programming, but the way Haskell or Ocaml are built makes it really hard to consider them seriously for anything but research and/or fooling a
by turminal 5y ago
I like functional programming, but the way Haskell or Ocaml are built makes it really hard to consider them seriously for anything but research and/or fooling around.
- the_af 5y agoDo you mean it makes it really hard for you or in general? If in general... do you know about Jane Street? From Wikipedia: > Jane Street [...] adopted OCaml as its main programming language early on because the language's functional programming style and clear expressiveness made it possible for code reviews to be performed by traders who were not programmers, to verify that high-performance code would do what it was intended to do. [...] "OCaml helps us to quickly adapt to changing market conditions, and go from prototypes to production systems with less effort" Doesn't seem like either research or fooling around to me! Those sound like actual, pragmatic, business-related benefits!
- turminal 5y ago> Do you mean it makes it really hard for you or in general? I don't think I'm exactly alone, but there's definitely lots of people that would disagree. I know about Jane Street and I admire they manage to do so, but I also think lots of security issues occur because the language/system/library/framework in use is not well understood and Ocaml makes that particularly hard in my opinion. And I'm not talking about the "functional programming is hard" problem, because I don't find it harder than other paradigms I tried. I'm talking about the quality of the docs and the speed with which the language evolves.
- the_af 5y agoRe: the docs, I find your assertion puzzling, or at least, incompatible with this quote: > [OCaml's] clear expressiveness made it possible for code reviews to be performed [at Jane Street] by traders who were not programmers If OCaml was a mess, difficult to understand, or had terrible docs, what the quote describes just wouldn't be possible. Non-programmers doing code reviews! What could be more pragmatic than that?
- bidirectional 5y agoI don't see how this isn't just patently false. Haskell is used to process every single user interaction on Facebook and OCaml handles billions of dollars of trades daily at Jane St. I doubt your use cases are more 'serious' than that.
- spekcular 5y ago> Haskell is used to process every single user interaction on Facebook Do you have a citation for this? I'd love to read more.
- bidirectional 5y agohttps://engineering.fb.com/2015/06/26/security/fighting-spam-with-haskell/ https://engineering.fb.com/2015/06/26/security/fighting-spam... Every interaction is processed by a Haskell rule engine to check for spam.
- spekcular 5y agoThanks, that's a good read.
- turminal 5y agoI don't think "$bigcorp uses $technology" necessarily means said technology is serious and reliable. It can also mean they just have a big enough dedicated team to adapt it well to their use case. Facebook uses btrfs in production and I'm sure it works great for them, but that doesn't mean btrfs is a good fs. And Jane Street has basically built their own stdlib for Ocaml, didn't they?
- Zababa 5y agoOCaml is used for Frama-C (static analysis of C), Coq (a proof assistant), Pyre (Python typechecker), Hack (Typed PHP), Mirage (Unikernel, used by Docker for Widnows and Mac), Flow (Javascript typechecker), semgrep. All of these are serious.
- 1-more 5y ago> the way Haskell or Ocaml are built be specific
- turminal 5y agoThey both have a single relevant implementation and for haskell in particular it's a complex behemoth. Haskell has a specification in theory but a sea of extensions exists. Ocaml does not have a specification. Ocaml lacks good docs and is moving too fast. But the most significant thing in my opinion is the community, which is heavily research oriented. And that's fine, we need research languages and I'll gladly continue to write software in Ocaml, but I wouldn't want to pick it for a project I'd want to be well engineered.
- Zababa 5y agoI don't think a single relevant implementation is a problem, especially when therer are not a lot of people working on these languages. I'm also surprised that you think OCaml is moving too fast. The multicore took a lot of time to have a proper design and backwards compatibiltiy, and old code compiles really well.
- deleted 5y ago[deleted]