Hacker News new | ask | show | jobs
by villageidiot 6208 days ago
I've never had a problem with heredoc. I'm curious what you mean when you say "I can picture a number of ways to get almost the same effect . . . without complicating the syntax". Would you care to illustrate your point with an example so we can make the discussion a little bit more concrete?
1 comments

Put the text from a heredoc in a comment with special tags. Have a special method that lets you retrieve the text in the same source file. This puts zero syntactic load on the language, but has much the same effect. You can even have embedded methods, source debugging, regexes. But there's no additional syntax.