Hacker News new | ask | show | jobs
by otini 3490 days ago
Firstly, if your macro does not typecheck, it means that executing it might result in a segfault or something similar, since macros are regular OCaml functions. Secondly, if macro typechecks, then it is guaranteed to expand without errors, and I think that's a nice guarantee to have.
1 comments

> Firstly, if your macro does not typecheck, it means that executing it might result in a segfault or something similar, since macros are regular OCaml functions.

I see. The only time I've extensively used (real) macros has been with racket, where they aren't regular functions at all. I suppose my ignorance of Ocaml macros is showing here.