4 ms·
Debatable whether that would actually work in practice. /* nested /* comments */ don't work */
by tedunangst 9y ago
Debatable whether that would actually work in practice.
/* nested /* comments */ don't work */
- int_19h 9y agoThey don't work in C, but that's an arbitrary decision made by its designers. There are many languages that have balanced comments that can be nested. In OCaml, for example, this is legal: (* nested (* comments *) work *)
- jraph 9y agoThis is possible in D using /+ comments +/. https://wiki.dlang.org/Commenting_out_code#Nested_comments https://wiki.dlang.org/Commenting_out_code#Nested_comments This allows commenting out code containing comments, which can be useful when debugging or giving usage examples in the code.