At 5:38 PM +0000 11/27/03, Pete Lomax wrote:On Thu, 27 Nov 2003 09:52:10 -0500, Melvin Smith <[EMAIL PROTECTED]> wrote:
At 12:02 PM 11/27/2003 +0000, Pete Lomax wrote:Perl6 already does interpolation without special support from IMCC.I'll rephrase. Is there anything knocking about which would help with eg: printf (pFile, "Amount %12.3f [%-10.10s]\n",balance,name);
Or do I have to rip the string apart character-by-character, then throw all my variables about in registers, cutting, chopping and padding them into shape, and then dumping them in iddy little bits?
Depends entirely on two things:
1) Whether we want printf-style functionality as part of the core 2) Whether you want to use it
I think the answer to #1 is a big yes. You can answer #2 as you need. :)
To me, variable interpolation means high-level language interpolation using the high-level symbol name. printf isn't the same. I'd call it "format interpolation", if that makes sense.
1) interpolation by the symbol name we don't need at the Parrot/IMC level, and this was what the FAQ addressed. I could be wrong, though.
2) printf/sprintf - we do need it (and implemented in C) since it is a staple and is the
reasonable hook for HLL implementors to do interpolation without having
to write a special native method or PMC for each language.
-Melvin