Aristotle Pagaltzis wrote:
> And this contradiction – that being able to declare sugar is
> good, but the way that languages have permitted that so far leads
> to insanity – is what sent me thinking along the lines that there
> has to be some way to make overloading sane. And we all know that
> all is fair if you predeclare. And that led me to the flash of
> inspiration: why not make overloading a property of the source
> (lexical, early-bound) rather than of the values (temporal, late-
> bound)? And what we need to do that is a way to say "this scope
> is special in that the operators herein follow rules that differ
> from the normal semantics." There you have it.
So if I'm understanding you correctly, the following would be an
example of what you're talking about:
{ use text; if $a > "49" { say $a } }
...with the result being the same as Perl5's 'if $a gt "49" { say $a
}' (so if $a equals '5', it says '5'). Am I following you? If so,
I'm not seeing what's so exciting about the concept; all it is is a
package that redefines a set of operators for whatever scopes use it.
If I'm not following you, I'm totally lost.
--
Jonathan "Dataweaver" Lang