February 04, 2002
I can live with that.

--
The Villagers are Online! villagersonline.com

.[ (the fox.(quick,brown)) jumped.over(the dog.lazy) ]
.[ (a version.of(English).(precise.more)) is(possible) ]
?[ you want.to(help(develop(it))) ]


February 04, 2002
"Pavel Minayev" <evilone@omen.ru> wrote in message news:a3mpt3$1gud$1@digitaldaemon.com...
> "Russ Lewis" <spamhole-2001-07-16@deming-os.org> wrote in message news:3C5ECBF3.3270321C@deming-os.org...
>
> > When I first looked at what you were talking about, I was with Walter...why do you need it?  However, I repent.  We do need to be able to provide separate implementations.
>
> ...because matching names doesn't mean matching purposes!
>

I agree, but it can be a drag to.
If some interface inherits from another, you can't implement both
of these interfaces, except if D does like it does now, assume
that when two functions in different interfaces have the same name
and signature they represent the same operation. It should be
possible to qualify them if you want different behaviour. Possible,
but not necessary!


--
Stijn
OddesE_XYZ@hotmail.com
http://OddesE.cjb.net
__________________________________________
Remove _XYZ from my address when replying by mail



March 23, 2003
"Pavel Minayev" <evilone@omen.ru> escribió en el mensaje
news:a3gm8e$1m2f$1@digitaldaemon.com...
| "Walter" <walter@digitalmars.com> wrote in message
| news:a3gh3a$1k44$2@digitaldaemon.com...
|
| > Your only option is to change the name on one of the interfaces.
|
| Aren't you going to add some way to resolve this, like in C#
| or Delphi? Like this:
|
|     class foobar: foo, bar
|     {
|         void foo.baz() { ... }
|         void bar.baz() { ... }
|     }
|

Some agreed that it could be useful. I'm also for it, specially because this is illegal:

interface I1 {
 int a();
}
interface I2 {
 void a();
}
class C:I1,I2 {
 void a() { return; }
 int a() { return 0; }
}

But if I could do:

class C:I1,I2 {
 void I2.a() { return; }
 int I1.a() { return 0; }
}

Then there would be no problem. Or am I wrong? I think I am, but I don't why :D

————————————————————————— Carlos Santander

|


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.463 / Virus Database: 262 - Release Date: 2003-03-17


March 30, 2003
"Carlos Santander B." wrote:

> "Pavel Minayev" <evilone@omen.ru> escribió en el mensaje
> news:a3gm8e$1m2f$1@digitaldaemon.com...
> | "Walter" <walter@digitalmars.com> wrote in message
> | news:a3gh3a$1k44$2@digitaldaemon.com...
> |
> | > Your only option is to change the name on one of the interfaces.
> |
> | Aren't you going to add some way to resolve this, like in C#
> | or Delphi? Like this:
> |
> |     class foobar: foo, bar
> |     {
> |         void foo.baz() { ... }
> |         void bar.baz() { ... }
> |     }
> |
>
> Some agreed that it could be useful. I'm also for it, specially because this is illegal:
>
> interface I1 {
>  int a();
> }
> interface I2 {
>  void a();
> }
> class C:I1,I2 {
>  void a() { return; }
>  int a() { return 0; }
> }
>
> But if I could do:
>
> class C:I1,I2 {
>  void I2.a() { return; }
>  int I1.a() { return 0; }
> }
>
> Then there would be no problem. Or am I wrong? I think I am, but I don't why :D

I don't see any reason why the latter version must be illegal.  However, you should note, of course, that you would not be able to call either version of a() directly, without a cast.

--
The Villagers are Online! http://villagersonline.com

.[ (the fox.(quick,brown)) jumped.over(the dog.lazy) ]
.[ (a version.of(English).(precise.more)) is(possible) ]
?[ you want.to(help(develop(it))) ]


March 30, 2003
That would be the best approach. After all, the usual reason for deriving from an interface is to deal polymorphically with the instances via the interface, in which guise the casts are non necessary.

In fact, I can't see how the language could _not_ support this. Is that really the current state of play? If so, we'll be forced to do use intermediate classes, a la C++, which really sucks

"Russ Lewis" <spamhole-2001-07-16@deming-os.org> wrote in message
news:3E86F3FE.43B6C650@deming-os.org...
"Carlos Santander B." wrote:

> "Pavel Minayev" <evilone@omen.ru> escribió en el mensaje
> news:a3gm8e$1m2f$1@digitaldaemon.com...
> | "Walter" <walter@digitalmars.com> wrote in message
> | news:a3gh3a$1k44$2@digitaldaemon.com...
> |
> | > Your only option is to change the name on one of the interfaces.
> |
> | Aren't you going to add some way to resolve this, like in C#
> | or Delphi? Like this:
> |
> |     class foobar: foo, bar
> |     {
> |         void foo.baz() { ... }
> |         void bar.baz() { ... }
> |     }
> |
>
> Some agreed that it could be useful. I'm also for it, specially because
this
> is illegal:
>
> interface I1 {
>  int a();
> }
> interface I2 {
>  void a();
> }
> class C:I1,I2 {
>  void a() { return; }
>  int a() { return 0; }
> }
>
> But if I could do:
>
> class C:I1,I2 {
>  void I2.a() { return; }
>  int I1.a() { return 0; }
> }
>
> Then there would be no problem. Or am I wrong? I think I am, but I don't
why
> :D

I don't see any reason why the latter version must be illegal.  However, you
should note, of course, that you would not be able to call either version of
a()
directly, without a cast.

--
The Villagers are Online! http://villagersonline.com

.[ (the fox.(quick,brown)) jumped.over(the dog.lazy) ]
.[ (a version.of(English).(precise.more)) is(possible) ]
?[ you want.to(help(develop(it))) ]



1 2 3
Next ›   Last »