On Tue, Nov 30, 2004 at 05:54:45PM -0700, Luke Palmer wrote: > Jim Cromie writes: > > > > since the qq:X family has recently come up, Id like to suggest another. > > > > qq:i {} is just like qq{} except that when it interpolates variables, > > those which are undefined are preserved literally. > > Eeeew. Probably going to shoot this down. But let's see where you're > going with it :-)
Bang! :-) The problem with "interpolate if you can or leave it alone for later" is that when later comes around you're in a quandry. Is the string "$var" that is in the final result there because it was "$var" in the original and couldn't be interpolated, or was it a $foo that had its value of "$var" injected into its place? The "maybe do it now, finish up later what wasn't done the first round" approach runs the risk of double interpolation. (Or single interpolation, or non-interpolation, whichever it happened to roll on the dice.) If you're Randal Schwartz discovering a s/Old Macdonald/$had a $farm/eieio accidental feature, that can be useful; but for mere portals, it is just a bug waiting to surface. --