Larry Wall skribis 2004-06-24 11:29 (-0700):
> This is Perl 6.  Everything is an object, or at least pretends to be one.
> Everything has a .boolean method that returns 0 or 1.  All conditionals
> call the .boolean method, at least in the abstract.  (The optimizer is
> free to optimize the method call away for known types within known
> conditionals, of course.  It had better, or evaluating the truth of
> .boolean will end up calling .boolean again...  :-)

I didn't know about the (to-be) existence of .boolean. It makes things
fun and easy, though.

However, is the name "boolean" final? I would prefer "true", perhaps
with a corresponding "false". 

That is, assuming that there will be $foo.defined and $foo.empty. Hm. I
wonder where (and if) I read about .empty. Can't find it.

> not when the data becomes false.  Plus we'll have the // operator.)

I'll be wanting a length-or. Perl 6 will make coding it easy enough to
not need it in the core. But the operator needs a symbol. I'm assuming
infix:"" will work. But will there be a way to ask Perl if syntax can be
used without introducing possible ambiguity?

A circumfix ++ operator won't work for several reasons. What will Perl
do if you try defining one?

Please don't say that picking a random sequence of at least 5 different
unicode dingbats will be the best way to be sure :)


Juerd

Reply via email to