POV-Ray : Newsgroups : povray.off-topic : Lots of statistics : Re: C# Server Time
29 Jul 2024 08:24:02 EDT (-0400)
  Re: C#  
From: Invisible
Date: 14 Aug 2012 04:40:38
Message: <502a0f06@news.povray.org>
On 14/08/2012 02:08 AM, Darren New wrote:
> 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?

So if a class tries to implement both interfaces, it can't provide 
different implementations for these two distinct methods merely because 
their names clash?

>> 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.

According to the Great Language Shootout, C# Mono is 3x slower than C. 
(Then again, Haskell is 2x slower...)

>> 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.

Sure. Because Eiffel doesn't support dynamic linking.

>> 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.

That sounds remarkably hard to get right...


Post a reply to this message

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