r/programming • • May 10 '18

Java: Executing code in comments?!

http://programming.guide/java/executing-code-in-comments.html
260 Upvotes

84 comments sorted by

View all comments

Show parent comments

1

u/aioobe May 11 '18

This is basically the first thing the article addresses.

1

u/DynamicTextureModify May 12 '18

It really doesn't.

You don’t even need to figure out where comments begin and end!

Is not a good thing. Why would anyone want that?

1

u/aioobe May 12 '18

You asked for the rationale behind parsing unicode expressions in comments. The rationale is that it makes it trivial to transform a program written in Unicode to ASCII.

Why anyone (except the person writing the code for transforming between encodings) would want that is not answered in the article, but that is a different question.

Also, I don't think anyone here argues that it is a good thing.

1

u/DynamicTextureModify May 12 '18

I guess you're right, I was just expecting the rational to be... well, rational. Hah.