Larry Wall skribis 2004-06-24 12:24 (-0700):
> Well, the type/property name doesn't have to be "boolean"--it could
> be "truth", instead. 

I understand that 'true' and 'false' can't be used.

However, "truth" is in the same category as "definedness", and
$foo.definedness looks awful :)

Perhaps for conversion to a certain type, simply the type name can be
used as a method. Then $foo.int and $foo.bool make the same kind of
sense. (Or $foo.Int and $foo.Bool, but then int $foo would be strange
(I assume int $foo returns a fully functional scalar integer))

> > [length-or]
> What do you mean by "length"? [bytes, graphemes, etc]

Good question. Probably byte length. If there is one byte, that has to
represent at least one of the other length-units, right?

Not having 'length' will be hard to get used to. Perhaps I'll try to
make it easier (and thus harder in the longer term) for myself by
defining something that does .isa('Str') ? .chars : .isa('str') ? .bytes
: .isa('Hash') ? .keys : .isa('Array') ? .elements : 1.

Synopsis 6 describes 'str' as 'native string'. Is my assumption that
such a string is one that doesn't have multi-byte characters correct?


Juerd

Reply via email to