Multilanguage (programming) comments
Last week at work, I sat down and wrote a quick little Perl utility.
I tried to run the script, but got an error message. I looked at the code and realized that I had used "//" as a comment indicator. Too much PHP and JavaScript and, lately, Java.
So, only half paying attention, I changed the comment-start string to "/*". But that didn't work either.
Oh, of course, I thought: I forgot the close-comment string. So I added a "*/" at the end.
Bizarrely, that didn't work either.
I looked at my code again.
Then I thought, Wait, what's the comment string in Perl?
And lo and behold, when I changed the comments to start with "#" (and took out the extraneous "*/"), everything worked fine.
Moral: There should be only one programming language.
No, wait, that can't be right. Maybe:
Moral: All programming languages should use consistent and/or interchangeable syntax.
No, I don't think that's right either.
Got it:
Moral: Jed should pay more attention when writing code.