View mode: basic / threaded / horizontal-split · Log in · Help
September 22, 2003
Re: DMD 0.73 release
Why not to use the same definition as in C#? It belongs to MS, but I think is a
good idea.
I have no example now, but simply look in the C# doc.

Just an ideea...

BTW, I hear that Delphi and C# have the same designer?




In article <bklb95$1kcj$1@digitaldaemon.com>, Philippe Mori says...
>
>> > without proper property syntax,
>> > what happens with a property or function that returns a class that
>> > overloads opCall ?
>>
>> You'll need to have an extra ().
>>
>>
>
>This is a reason why IMHO it would be better to have a property
>keyword. That way it would be possible to forward call to an inner
>class with changing the class interface in the same way that in C++
>we can chain operator->.
>
>An example:
>
>class A {
>    void opCall(int i);
>}
>
>class B {
>    property A prop_name() { return a }
>
>    A a;
>}
>
>// used that way:
>
>B b;
>b.prop_name(5);
>
>// instead of
>
>B b;
>b.prop_name()(5);
>
>This make it possible to replace a function by
>a class without needing the client code to be
>aware of it...
>
>But thinking of it, it would probably caused ambiguities
>if we allows both syntax (function call vs property)
>
>
September 22, 2003
Re: DMD 0.73 release
"Walter" <walter@digitalmars.com> wrote in message
news:bkkqg3$tjd$2@digitaldaemon.com...
>
> "Antti Sykäri" <jsykari@gamma.hut.fi> wrote in message
> news:slrnbmr5a2.qqp.jsykari@pulu.hut.fi...
> > The mathematical term would be "anticommutative".
> >
> > "An operator * for which
> >
> > a * b = -b * a
> >
> > is said to be anticommutative"
> >
> > http://mathworld.wolfram.com/Anticommutative.html
>
> I didn't know that! Thanks for the pointer.

There is actually some really important cool stuff that depends on
anticommutativity.  Geometric algebra is based on it.  So any optimizations
you do on operator * like swapping the inputs is going to cause problems
with people trying to use operator * to implement say, geometric product,
which is anticommutative.  We either need another operator or even better
would be the ability to specify the behavior of the operators as we overload
them.  precedence, associativity, fixity, commutativity, etc.

Sean
September 23, 2003
Re: DMD 0.73 release
"Felix" <Felix_member@pathlink.com> wrote in message
news:bkm066$2jer$1@digitaldaemon.com...
> BTW, I hear that Delphi and C# have the same designer?

I think that's correct. The same fellow who did the original Turbo Pascal.
Next ›   Last »
4 5 6 7 8
Top | Discussion index | About this forum | D home