When people refer to the "revised syntax" in OCaml, do they mean that this will become a new syntax for the language, or is it just an alternative syntax created in CamlP4? If it's the former, then when does the "revised syntax" become the "official syntax" of OCaml?
The revised syntax is just an alternative to the original that is implemented in Camlp4/5 (there is also a Lisp syntax written in Camlp5). Some people prefer it, but I would discourage you from using it as it's only likely to make your code more confusing for other OCaml programmers. One place it's valuable to know the revised syntax is when you're writing Camlp4/5 extensions---the revised syntax is used for patterns and rewrites, probably because it's somewhat more consistent than the original.
As far as I know, there is no plan to replace the original OCaml syntax with the revised syntax.
This is just an alternative concrete syntax. I think that's just to demonstrate how powerful camlP4 is, a kind of proof of concept.
© 2022 - 2024 — McMap. All rights reserved.