POV-Ray : Newsgroups : povray.off-topic : Lots of statistics : Re: C# Server Time
29 Jul 2024 08:16:55 EDT (-0400)
  Re: C#  
From: Darren New
Date: 13 Aug 2012 21:08:02
Message: <5029a4f2$1@news.povray.org>
On 8/13/2012 9:22, Orchid Win7 v1 wrote:
> Weirdly, both Java and C# actually /allow/ interfaces to inherit, thus
> defeating the whole point of the exercise.

Diamond inheritance isn't a problem if you don't have implementations.

OK, so Thread declares void run(), and DistressedDamsel declares void run(). 
Why would those declarations conflict?

> It makes little to no sense in C#, a language which is already doomed to be
> horrifyingly inefficient before you've even written a single line of code.

It's becuase C# is a component-oriented language. It's designed to let 
people write code and release the object code and have others use it without 
recompiling.

It's also not intrinsically inefficient. For example, Singularity uses it to 
write its kernels in.

> Arguably you could have the compiler detect where dynamic binding is and is
> not needed. That requires whole-program analysis, however.

That's what Eiffel does.

> No problem for
> Haskell, but C# explicitly supports run-time loading of additional code, so
> there's no telling at compile-time what external code might do.

Sure there is, because you recompile the code while it's running.

> Yeah, I don't know. I'm slowly coming around to the idea that maybe we
> should forget about all this "inheritance" stuff and focus on interfaces as
> the primary thing of interest...

I kind of like where Go went: static duck typing.


-- 
Darren New, San Diego CA, USA (PST)
   "Oh no! We're out of code juice!"
   "Don't panic. There's beans and filters
    in the cabinet."


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.