Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Functional programming beyond Haskell

Name: Anonymous 2015-02-20 8:36

We have all learned functional programming in Haskell, but there are more functional languages like Lisp, Scheme, ML, and Clean.

Why should we even bother to look further than Haskell?

- You want your programs to run faster.
- Monads drive you mad (what are they anyway? warm fuzzy things?).
- You need objects.
- You sometimes need a more powerful module system.
http://www.cs.uu.nl/wiki/pub/Stc/BeyondFunctionalProgrammingInHaskell:AnIntroductionToOCaml/ocaml.pdf

Name: Anonymous 2015-02-28 14:34

>>92
It's a tradeoff. It's not because they want you to type the arithmetic operators, it's because they need you to do it for inference. It's going to come down to a preference. You can assert one or the other all day, but it's only a question of taste.

>>93
I understand that OCaml does not have generics.
No. OCaml makes the curious choice of disallowing implicit type conversions and not having any operators overloaded by type, even between scalar numeric types.

The only good thing about having different operators for float and integer operations is the explicit information. But it's not better information than you get with Haskell, where function signatures are the norm. Since global inference and elided signatures are the norm in OCaml, these different operators are necessary to match the information available. OCaml also needs them to type functions because this really is the minimum information level for OCaml's type system.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List