3 ms·
Does OCaml not have nested comments? Typically a language supporting /* */ will treat them like parentheses and require each opener to match a closer. (Not that
by pie_flavor 4y ago
Does OCaml not have nested comments? Typically a language supporting /* */ will treat them like parentheses and require each opener to match a closer. (Not that this doesn't make documenting the behavior of files/static/* harder - hence Rust and C# preferring to document with line comments.)
- octachron 4y agoOCaml has nested comments (and comments are also aware of string literals). Thus any fragments of valid OCaml code can be commented without changes. In other words, the whole line below is commented-out. (* let x = "*)" (* inner comment *) *)
- folmar 4y ago> Typically a language supporting /* */ will treat them like parentheses This is not the case for C, C++ or JavaScript for a start.