3 ms·
syntax doesn't typically matter as long as you are at least as productive as in other languages. i.e. if editors can do the same things with keybindings. The p
by devmunchies 4y ago
syntax doesn't typically matter as long as you are at least as productive as in other languages. i.e. if editors can do the same things with keybindings.
The problem with the (* *) comments is that I can select a block of text, a portion of which is already commented out, and commented the whole selection. You can't solve this without lossy commenting (e.g. removing the inner comment). The portion that is already commented will screw it up. This doesn't matter in single line comments since it will just add an additional "//" in front of a commented line.
- pie_flavor 4y agoDoes 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.