> Line comments are declared with // and all content from the starting position to the end of the line is considered a comment.
> Range comments are used to comment a certain range. /* is used to start a range comment and */ is used to end it.
> Where range comments are exist, they are ignored even if a line comment is written with //. This means your compiler will not ignore the behavior of a range comment closing */ after // characters.
It wasn't till I read this that I realized this is an issue when mixing both types of comments.
Jules' rule seems to introduce an asymmetry though. While the compiler respects */ in a line comment, it still doesn't respect /* in a line comment?!
I wonder how other languages deal with this issue.
tromp•1h ago
> Range comments are used to comment a certain range. /* is used to start a range comment and */ is used to end it.
> Where range comments are exist, they are ignored even if a line comment is written with //. This means your compiler will not ignore the behavior of a range comment closing */ after // characters.
It wasn't till I read this that I realized this is an issue when mixing both types of comments.
Jules' rule seems to introduce an asymmetry though. While the compiler respects */ in a line comment, it still doesn't respect /* in a line comment?!
I wonder how other languages deal with this issue.