News for hackers. Stuff that matters.
Re:Why ML/OCaml are good for writing compilers (1998) by jldugger on Sunday April 16, 2017 @02:19PM (#14126761)
I've done it when writing translators / compilers for school. If you're pattern matching against an AST, its easy to to have a pretty big list of possible types the AST can contain.

Probably this is a code smell that should be rearchitected.

Re:Why ML/OCaml are good for writing compilers (1998) by abhirag on Sunday April 16, 2017 @05:05PM (#14127503)
Haven't used OCaml but the recommended practice in Erlang/Elixir is to break down complex pattern matches into separate function clauses, as function calls are also driven by pattern matching.