From: Dan Sugalski [mailto:[EMAIL PROTECTED]]
> At 05:09 PM 3/23/2001 -0800, Damien Neil wrote:
> > So the results of ord are dependent on a global setting for
> > "current character set" or some such, not on the encoding
> > of the string that is passed to it?
> 
> Nope, ord is dependent on the string it gets, as those 
> strings know what their encoding is. chr is the one dependent
> on the current default encoding.

Are built-ins like chr going to be nailed to one encoding at compile time,
or will we be able to toggle the default encoding setting at runtime?

Besides having the ord opcode dispatched by the string tag, will it be
possible to have the chr opcode dispatched by the type of return value
wanted?

$foo:ASCII = chr(65);
@foo:ASCII = map chr($_), 80, 69, 82, 76;

I assume internals-wise that this is similar to whether a function was
called in a scalar, array, or void context... But further raises the spectar
of multiple dispatch to include typing.

Garrett

Reply via email to