When building code strings in Perl 5 I usually write the code,
then wrap it in double quotes, then "\" escape everything light blue
under syntax highlighting.  I was wondering if there'll a better
way in Perl 6.
I thought it would be nice to define the variables you wish to
interpolate individually, perhaps as extensions to the :s, :a,
etc quote adverbs, perhaps using a signature object.
Since user-defined quotes are possible it shouldn't be too hard
to add in any case, so I might just leave off the waffling there.

One more waffle:

Closure interpolation seems largely incompatible "" strings.
Interpolation restricted by variable doesn't help this anyway
so perhaps there's a more general solution covering all cases.
(or just q:c(0))

Another possibility is that code string suppport may be less important given the macro and grammar tools available. On the other hand, the code is not always being generated for immediate consumption and is not always Perl.

That probably counts as at least two waffles,


...Maybe CODE's dwimmy binding could be abused: (CODE { ... }).perl

The occurrence of mysteries is alway by word of mouth.   -- Hagakure

Reply via email to