MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/programming/comments/8iffw2/java_executing_code_in_comments/dyrscbh/?context=3
r/programming • u/javinpaul • May 10 '18
84 comments sorted by
View all comments
163
Actually executing code NOT in comments.
20 u/KnightMiner May 10 '18 Well, maybe we should say executing code no longer in comments, since it was in a comment at one time in its life 4 u/stronglikedan May 10 '18 edited May 10 '18 Since it was typed after the newline character characters, it was never in the comment. Comment slashes --> space (the comment) --> newline --> code 20 u/KnightMiner May 10 '18 Except technically it was not a newline character when it was typed, it was a collection of characters to be replaced with a newline. 1 u/stronglikedan May 10 '18 Fixed my previous comment. It was intended to represent a new line, same as pressing the enter key, so it was intended to end the comment. Therefore, the code was never part of the comment, as the author intended.
20
Well, maybe we should say executing code no longer in comments, since it was in a comment at one time in its life
4 u/stronglikedan May 10 '18 edited May 10 '18 Since it was typed after the newline character characters, it was never in the comment. Comment slashes --> space (the comment) --> newline --> code 20 u/KnightMiner May 10 '18 Except technically it was not a newline character when it was typed, it was a collection of characters to be replaced with a newline. 1 u/stronglikedan May 10 '18 Fixed my previous comment. It was intended to represent a new line, same as pressing the enter key, so it was intended to end the comment. Therefore, the code was never part of the comment, as the author intended.
4
Since it was typed after the newline character characters, it was never in the comment. Comment slashes --> space (the comment) --> newline --> code
20 u/KnightMiner May 10 '18 Except technically it was not a newline character when it was typed, it was a collection of characters to be replaced with a newline. 1 u/stronglikedan May 10 '18 Fixed my previous comment. It was intended to represent a new line, same as pressing the enter key, so it was intended to end the comment. Therefore, the code was never part of the comment, as the author intended.
Except technically it was not a newline character when it was typed, it was a collection of characters to be replaced with a newline.
1 u/stronglikedan May 10 '18 Fixed my previous comment. It was intended to represent a new line, same as pressing the enter key, so it was intended to end the comment. Therefore, the code was never part of the comment, as the author intended.
1
Fixed my previous comment. It was intended to represent a new line, same as pressing the enter key, so it was intended to end the comment. Therefore, the code was never part of the comment, as the author intended.
163
u/kking254 May 10 '18
Actually executing code NOT in comments.