Re:Typed, modular macros for OCaml
by otini on Sunday November 27, 2016 @07:57AM
(#13048914)
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.
[ Parent
| on HN ]
Re:Typed, modular macros for OCaml
by lacampbell on Sunday November 27, 2016 @01:06PM
(#13050409)
> 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.