3 ms·
> in Ocaml, that `@@` is placeholder that tells the code preprocessor where to insert the actual code for the implementation of `get`. Where's the documentati
by AlexCoventry 9y ago
> in Ocaml, that `@@` is placeholder that tells the code preprocessor where to insert the actual code for the implementation of `get`.
Where's the documentation for this? I'm only familiar with `@@` as a low-precedence no-op operator which helps to cut down on parentheses.
- ufo 9y agoThe `[@@blah]` syntax refers to the extension-points feature that was introduced in Ocaml 4.02: https://whitequark.org/blog/2014/04/16/a-guide-to-extension-points-in-ocaml/ https://whitequark.org/blog/2014/04/16/a-guide-to-extension-... https://blog.janestreet.com/extension-points-or-how-ocaml-is-becoming-more-like-lisp/ https://blog.janestreet.com/extension-points-or-how-ocaml-is... These can be used to do the sort of metaprogramming that people used to do with camlp4. If you want to search more, the other keyword for googling would be "ppx".
- AlexCoventry 9y agoThanks.