Re: RFC 230 (v1) Replace Cformat built-in with pragmatically-inducedCformat function

2000-09-18 Thread Damian Conway

print format $fmt, @stuff;

Early brain-dump. This should be it.

That's what I've done for the second version (on its way soon).

Damian



Re: RFC 230 (v1) Replace Cformat built-in with pragmatically-inducedCformat function

2000-09-15 Thread Nathan Wiger

 I loathe the indirect object syntax.

Well that makes one of us! ;-)

 Easy. Put them in a subroutine:
 
 sub format1 { format $template1, @data };
 sub format2 { print STDERR format $template1, @data };
 # etc.

Gag! Cough! Ack!  :-}

Not trying to be mean, but this doesn't make things easy. As I mentioned
in my previous email, being able to say:

   write STDOUT;

is a *benefit*. It seems your proposal is 90% of the way there if it
just followed suit with the other commonly-used printing functions:

   print $STDERR @stuff;
   printf $STDERR $fmt, @stuff;
   format $STDERR $fmt, @stuff;

Looks pretty consistent to me, and makes things easy too.

Either that, or drop the printing in a void context altogether, and just
tell people they have to say

   print format $fmt, @stuff;

Which I'm ok with too. But partially supporting printing, only to the
default filehandle, I don't think is a good idea. You're gonna end up
with lots of nasty code that way, which this RFC would otherwise
prevent.

-Nate