Vic,

Please forgive my curiosity, maybe we are on to something here. :-)

If you knew nothing about xHarbour, what would be your expectation when 
overloading

   <Find> $ <Target>

Which of the 2 arguments should be overloaded?

Ron

--------------------------------------------------
From: "Vicente Guerra" <v...@guerra.com.mx>
Sent: Sunday, October 11, 2009 10:02 PM
To: "Ron Pinkas" <ron.pin...@xharbour.com>
Cc: "xHarbour-Developers List" <xharbour-developers@lists.sourceforge.net>
Subject: Re: [xHarbour-developers] ChangeLog: 2009-10-11 13:55 UTC-0500 
VicenteGuerra

>     Ron,
>
>     xharbour/tests/overload.prg works with current "$" behaviour...
> looks like it's not a bug...
>
>     If both values besides "$" are operator-overloaded, "final
> programmer" can implement a verification on the executed side.
>
> Atte.
>  Vic
>
> On Sun, 11 Oct 2009, Ron Pinkas wrote:
>> Thanks for the clarification. I think we need to review this little more. 
>> For most operators, f.e:
>>
>>  LEFT + RIGHT
>>  LEFT - RIGHT
>>  LEFT * RIGHT
>>  LEFT / RIGHT
>>  LEFT ^ RIGHT
>>
>> The overloading context is determined the LEFT side of the operator. Also 
>> for
>>
>>  ARRAY[INDEX]
>>
>> But for the $ operator it seem to be a "copy/past" mistake to use the 
>> LEFT context, because the actual operation (SCAN) is performed on the 
>> RIGHT side. Therefore IMO we should only have one overloading for $, and 
>> it should belong to the RIGHT side. Otherwise there's always the 
>> possibility of a conflict because both the LEFT and the RIGHT might be 
>> overloaded yielding a conflict.
>>
>> Opinions?
> 

------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
xHarbour-developers mailing list
xHarbour-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/xharbour-developers

Reply via email to