Live data from Hacker News

Type-safe GraphQL with OCaml

andreas.github.io

101–102 of 102 posts

Re: Type-safe GraphQL with OCaml

#101
post #100
post #76

Earlier quoted context omitted.

Nowadays, OCaml has so many more syntactic sugar and typing goodies compared to SML, that it's not fair to compare them anymore. I'm no expert in SML, but from what I know: - OCaml's pattern matching is more powerful (more or-patterns, lazy, matching records with field-puning): `match x with lazy {x; y; z=(None | Some 0); _} -> x+y` - GADTs along with phantom types: many things are now type-safe (including the builti…

Ocaml is a mess. Just like C++, PHP, or Perl, it's spent way too much time bolting extra stuff here and there until different codebases can look like completely different languages. Ocaml's features don't flow well together and make it very hard to teach the language (as used in the real world) to new developers. Golang has fewer features than Ocaml and is worse in almost every way, but people love it's simplicity. T…

>Ocaml's features don't flow well together

May you provide an example of features which don't flow well together?

Re: Type-safe GraphQL with OCaml

#102
post #84

Earlier quoted context omitted.

There's some pretty fundamental reasons that ocaml does not support open classes/modular implicits in that fashion. Essentially you want Haskell's numeric tower, and while it's pretty amazing it's worth noting that it requires a lot of machinery with big implications.

> Essentially you want Haskell's numeric tower, and while it's pretty amazing it's worth noting that it requires a lot of machinery with big implications. Go on...

-lgmp for starters.
Post reply on HN