{"id":3378,"date":"2006-02-10T21:28:43","date_gmt":"2006-02-11T05:28:43","guid":{"rendered":"http:\/\/www.kith.org\/journals\/jed\/2006\/02\/10\/3378.html"},"modified":"2006-02-10T21:28:43","modified_gmt":"2006-02-11T05:28:43","slug":"multilanguage-programming-comm","status":"publish","type":"post","link":"https:\/\/www.kith.org\/jed\/2006\/02\/10\/multilanguage-programming-comm\/","title":{"rendered":"Multilanguage (programming) comments"},"content":{"rendered":"\n<p>Last week at work, I sat down and wrote a quick little Perl utility.<\/p>\n<p>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.<\/p>\n<p>So, only half paying attention, I changed the comment-start string to \"\/*\".  But that didn't work either.<\/p>\n<p><span class=\"thought\">Oh, of course<\/span>, I thought: <span class=\"thought\">I forgot the close-comment string<\/span>.  So I added a \"*\/\" at the end.<\/p>\n<p>Bizarrely, that didn't work either.<\/p>\n<p>I looked at my code again.<\/p>\n<p>Then I thought, <span class=\"thought\">Wait, what's the comment string in Perl?<\/span><\/p>\n<p>And lo and behold, when I changed the comments to start with \"#\" (and took out the extraneous \"*\/\"), everything worked fine.<\/p>\n<p><strike>Moral: There should be only one programming language.<\/strike><\/p>\n<p>No, wait, that can't be right.  Maybe:<\/p>\n<p><strike>Moral: All programming languages should use consistent and\/or interchangeable syntax.<\/strike><\/p>\n<p>No, I don't think that's right either.<\/p>\n<p>Got it:<\/p>\n<p>Moral: Jed should pay more attention when writing code.<\/p>\n\n","protected":false},"excerpt":{"rendered":"<p>Last week at work, I sat down and wrote a quick little Perl utility. I tried to run the script,&#8230;<\/p>\n","protected":false},"author":5,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[68],"tags":[],"class_list":["post-3378","post","type-post","status-publish","format-standard","hentry","category-programming"],"acf":[],"_links":{"self":[{"href":"https:\/\/www.kith.org\/jed\/wp-json\/wp\/v2\/posts\/3378","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.kith.org\/jed\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.kith.org\/jed\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.kith.org\/jed\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/www.kith.org\/jed\/wp-json\/wp\/v2\/comments?post=3378"}],"version-history":[{"count":0,"href":"https:\/\/www.kith.org\/jed\/wp-json\/wp\/v2\/posts\/3378\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.kith.org\/jed\/wp-json\/wp\/v2\/media?parent=3378"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.kith.org\/jed\/wp-json\/wp\/v2\/categories?post=3378"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.kith.org\/jed\/wp-json\/wp\/v2\/tags?post=3378"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}