Returning to Action and Heredocs

Wow, where'd the time go.

Well, I can answer that. Short answer is I've had a lot to do at work (kinda expected), in studies (finishing a PhD dissertation), and health problems (yay anaemia!)

Good news is that I'm back in action.

Bad news is that I've decided that Ruby Heredocs are the ungodly spawn of Satan. Who decided that it was a good idea to be able to define multiple heredocs in a single statement? With the capability to mix different types of heredoc? I know that Heredocs are inherited from PHP/Bourne Shell, but seriously, there should be a limit to the number of syntacticly daft ideas that are being kept around because "other more respected languages did them". It doesn't matter when a dumb idea was made, or who did it, it remains dumb.

Yes, that's a rant. Quite a big one, and mainly from the perspective of someone trying to parse a language rather than using it. No offence intended for people who like heredocs, but I just don't see why a simple string would not suffice.

In any case, I've done a quick scan over the suite of VX games I'm using for compatibility testing and can't find any. Hence Heredocs won't be implemented in the first version of the Ruby parser, and that's the end of that.

And as a parting shot on Heredocs: remember custom string delimiters? They don't play nice with Heredocs. <<-%q"END" is a fun one; valid syntax, but I don't think there's a way to end the Heredoc (incidentally, <<%q"END" is invalid syntax). If anyone knows how to finish that Heredoc, answers on the back of a postcard (or in the comments)

Comments

Comments powered by Disqus