|
![](/i/fill.gif) |
>>> You can override it. You just don't get virtual dispatch.
>>
>> I know that's what C++ does. But I got the impression that in C# this is
>> a compile-time error. (Not that I can find any definitive word on this,
>> mind you...)
>
> AFAIK it is a compile-time error, unless you explicitly specify that you
> DO want to override it.
Yeah, that's what I thought.
> C# has a lot of these "if you DO mean it, say so in the code" things.
> Which I, personally, think is pretty smart.
If by "pretty smart" you mean "how /every/ programming language should
work in the first place", then yes.
>>> Yes. Well, what would you expect? A public method that returns a value
>>> of a type you can't see the declaration of?
>>
>> Haskell lets you do exactly that, yes.
>
> I /think/ you should avoid trying to compare maintream languages'
> features to those of Haskell.
My point being that everybody acts like "oh, of /course/ you can't
possibly do that", when in fact you can.
Besides, why should I avoid comparing things to Haskell? It's true that
almost nobody has heard of it. But does that mean that it's OK for
mainstream languages to be poor quality? I think not...
Post a reply to this message
|
![](/i/fill.gif) |