News for hackers. Stuff that matters.
Re:Ask HN: The importance of heredoc by villageidiot on Thursday June 25, 2009 @11:47AM (#673848)
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?
Re:Ask HN: The importance of heredoc by stcredzero on Thursday June 25, 2009 @10:43PM (#674851)
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.