Re: RFC 159 (v1) True Polymorphic Objects

2000-09-06 Thread Bennett Todd
2000-08-28-18:47:06 Tom Christiansen: > It strikes me as a bit reminiscent of (one reason) why Larry > didn't make a+b work on strings, since then while with numbers, > a+b and b+a would be the same, with strings they would not be, and > we have these rather deeply held convictions about such matt

Re: RFC 159 (v1) True Polymorphic Objects

2000-08-30 Thread Nick Ing-Simmons
Damian Conway <[EMAIL PROTECTED]> writes: > > >BTW, this is not just theoretical yearnings. I have written three modules >in the past year that do not work as well as they could, simply because it >is not possible to overload && and ||. > >Damian I have one too. -- Nick Ing-Simmons <[EMAIL PRO

Re: RFC 159 (v1) True Polymorphic Objects

2000-08-29 Thread Nathan Wiger
Piers Cawley wrote: > > And the RFC then proceeds to ignore this point and proposes something > that looks remarkably similar to the current overloading scenario. Or > am I missing something? I really can't see where the win is with this > proposition. The win is that this allows us to embed obj

Re: RFC 159 (v1) True Polymorphic Objects

2000-08-29 Thread Piers Cawley
Nathan Wigner in the guise of Perl6 RFC Librarian <[EMAIL PROTECTED]> writes: > You can use facilities such as C to help fix this issue, but > C is limited and slow. You can also overload operators, but > this is not flexible enough for many applications since it applies > to a package (and not in

Re: RFC 159 (v1) True Polymorphic Objects

2000-08-28 Thread Jeremy Howard
Tom Christiansen wrote: > Hm I don't recall C++ ever thinking to overload the control-flow > operators ("&&", "||", "," (that is, comma), and "?:"). Why not? > Even if their "a && b" should produce a more mundane 1 or 0, one > still might wish control. > '&&', '||', et al are just operato

Re: RFC 159 (v1) True Polymorphic Objects

2000-08-28 Thread Tom Christiansen
>I can currently overload + < > * to do this, but not &&. That's broken. Hm I don't recall C++ ever thinking to overload the control-flow operators ("&&", "||", "," (that is, comma), and "?:"). Why not? Even if their "a && b" should produce a more mundane 1 or 0, one still might wish contr

Re: RFC 159 (v1) True Polymorphic Objects

2000-08-28 Thread Damian Conway
> Summary: I think these should all simply break down into a single > Boolification test of some sort, as occurs already with operator > overload. Counter-summary: Although the high and low precedence binary ops could be rolled together, the current version of operator o

Re: RFC 159 (v1) True Polymorphic Objects

2000-08-28 Thread Tom Christiansen
Summary: I think these should all simply break down into a single Boolification test of some sort, as occurs already with operator overload. >LOGHIGHAND Called in && context >LOGHIGHOR Called in || context >LOGLOWAND Called in and context >LOGLOWOR Called in or context >LOGIFE

Re: RFC 159 (v1) True Polymorphic Objects

2000-08-27 Thread Damian Conway
>Data Conversion and Access >- >STRING Called in a string context >NUMBER Called in a numeric context >BOOLEAN Called in a boolean context > > >Operator Overloading >

Re: RFC 159 (v1) True Polymorphic Objects

2000-08-25 Thread Tom Christiansen
>You could overload > FILE < STRING >to be a print operator returning a FILE so we can do C++ like > cout << "hello Bjarne" <

Re: RFC 159 (v1) True Polymorphic Objects

2000-08-25 Thread David L. Nicol
Nathan Wiger wrote: > > Oh geez! I'm sorry, I forgot to mention David Nicol in the REFERENCES, > who also gave great input, especially on the BOOLEAN accessor. Thanks > David! I swear I'll put you in v2. :-{ > > -Nate Whatever. You could overload FILE < STRING to be a print operato

Re: RFC 159 (v1) True Polymorphic Objects

2000-08-25 Thread Nathan Wiger
Tom Christiansen wrote: > > I encourage one to examine how Python does this. Particularly attractive > is the way one does not have to distinguish between tie and operator > overloading there. I'll check it out. But just to clarify: This proposal means we won't be distinguishing between tie a

Re: RFC 159 (v1) True Polymorphic Objects

2000-08-25 Thread Tom Christiansen
>Jonathan Scott Duff wrote: >> >> >Operator Overloading >> >- >> >PLUS Called in + context >> >MINUSCalled in - context >> >TIMESCalled in * context >> >DIVIDED Called in / context

Re: RFC 159 (v1) True Polymorphic Objects

2000-08-25 Thread Nathan Wiger
Jonathan Scott Duff wrote: > > >Operator Overloading > >- > >PLUS Called in + context > >MINUSCalled in - context > >TIMESCalled in * context > >DIVIDED Called in / context > >

Re: RFC 159 (v1) True Polymorphic Objects

2000-08-25 Thread Jonathan Scott Duff
On Fri, Aug 25, 2000 at 03:23:25PM -, Perl6 RFC Librarian wrote: >Operator Overloading >- >PLUS Called in + context >MINUSCalled in - context >TIMESCalled in * context >DIVIDED

Re: RFC 159 (v1) True Polymorphic Objects

2000-08-25 Thread Nathan Wiger
Oh geez! I'm sorry, I forgot to mention David Nicol in the REFERENCES, who also gave great input, especially on the BOOLEAN accessor. Thanks David! I swear I'll put you in v2. :-{ -Nate Perl6 RFC Librarian wrote: > > This and other RFCs are available on the web at > http://dev.perl.org/rfc/ >