Larry wrote:
>     "\$i is $i.format('%04x')"
>     "\$i is $i.form('%04x')"
>     "\$i is $i.frm('%04x')"
>     "\$i is $i.as('%04x')"
>     "\$i is $i.f('%04x')"

If we keep it a method, then we do have the added benefit of being able to
override it for custom classes...something that sprintf doesn't provide.
i.e. Int, Num, Foo, Bar can all override the as method to do whatever is
appropriate for that type.  If we provide too much syntactic sugar, then
we may loose the ability to cleanly show a method call that can be
overridden.

Tanton

Reply via email to