opDollar

Stewart Gordon smjg_1998 at yahoo.com
Thu Sep 11 08:39:53 PDT 2008


"Bill Baxter" <wbaxter at gmail.com> wrote in message 
news:mailman.89.1220922329.19733.digitalmars-d-announce at puremagic.com...
> On Tue, Sep 9, 2008 at 9:37 AM, Andrei Alexandrescu
> <SeeWebsiteForEmail at erdani.org> wrote:
>> Denis Koroskin wrote:
>>> 4) We need some way of supporting dollar notation in user containers. 
>>> The
>>> hack of using __dollar is bad (although it works).

Agreed.

>> It doesn't work for multiple dimensions. There should be an opDollar(uint
>> dim) that gives the library information on which argument count it 
>> occured
>> in. Consider:
<snip>

opDollar is the wrong choice of name.  The op* methods are - as a rule - 
named after the semantic function of the operator, rather than what the 
operator looks like.  For example, opMul not opAsterisk, opIndex not 
opSquareBrackets.  Consequently, opStar is already inconsistently named; I 
think one such is enough.  As for what the function to overload $ should be 
called ... how about opEnd?

Where did this conversation begin?  I can't seem to find any messages up the 
thread from the one I'm replying to now.

Stewart.

-- 
My e-mail address is valid but not my primary mailbox.  Please keep replies 
on the 'group where everybody may benefit. 



More information about the Digitalmars-d-announce mailing list