POV-Ray : Newsgroups : povray.off-topic : And today, C# Server Time
5 Jul 2025 08:24:05 EDT (-0400)
  And today, C# (Message 13 to 22 of 82)  
<<< Previous 10 Messages Goto Latest 10 Messages Next 10 Messages >>>
From: Warp
Subject: Re: And today, C#
Date: 12 Feb 2008 12:06:40
Message: <47b1d220@news.povray.org>
Invisible <voi### [at] devnull> wrote:
> "Multiple inheritance is not supported, although a class can implement 
> any number of interfaces."

  I have never understood this, and never will. My question is: Why?

  If the answer to this question contains the term "diamond inheritance",
then my counter to that is: "Then forbid diamond inheritance, not multiple
inheritance."
  Having Problem with diamond inheritance is not a valid excuse to forbid
multiple inheritance completely.

-- 
                                                          - Warp


Post a reply to this message

From: nemesis
Subject: Re: And today, C#
Date: 12 Feb 2008 12:22:10
Message: <47b1d5c2@news.povray.org>
Invisible wrote:
> Here's the part I can't figure out. M$ basically exists to steal other 
> people's ideas, pass them off as "new" and "original", and con people 
> out of huge sums of money for it. So... why is M$ even interested in 
> something geniunely advanced and revolutionary?

to take the glory too.

> Yeah, looking at the Wikipedia page for C# I see they've stolen a whole 
> crapload of good ideas from Haskell.

in fact, that Erik Meijer guy is overly provocative and even gone as far 
as saying functional programming for the masses is really Visual Basic!
http://lambda-the-ultimate.org/node/1406

> Oh, sure. It has compilation, strong typing, compile-time error 
> checking, pervasive optimisation techniques, and an elegant underlying 
> algebra. Definitely a scripting language. :-P

read the PDF I linked to.  It's called "Functional programming with 
bananas, lenses, envelopes and barbed wire".  Despite the title, it's 
genuinelly interesting...


Post a reply to this message

From: Mike Raiford
Subject: Re: And today, C#
Date: 12 Feb 2008 12:24:09
Message: <47b1d639$1@news.povray.org>
Warp wrote:
> 
>   Usually these managers and their widgets can be kept separate, but in
> this one case I needed to be able to gave the same objects to both
> managers.
> 
>   Without multiple inheritance this would have been simply impossible.
> I can't think of any way to accomplish this if multiple inheritance was
> not supported. With C++'s multiple inheritance it worked beautifully.
> I could create objects which were of both widget types at the same time,
> and which could be given to both widget managers without even the
> slightest of problems.
> 
>   I just can't even begin to imagine how I could have done this eg. in
> Java. (At least not without crippling the system really badly and making
> it really cumbersome to use.)

It has its uses. There's no clean way to handle this situation in C# or 
Java.


> 
>   Just avoid diamond inheritance if you are unsure. It's not that hard.
> 
>   Being able to inherit from two (completely distinct) classes is extremely
> handy regardless.
> 

Only one problem with that: in both C# and Java, all classes have a 
common base. So, with multiple inheritance, diamonds are a given. Rather 
than address this, they chose to not allow multiple inheritance. I'm 
guessing Java has interfaces, like C#.

> 
>   I don't like languages which artificially limit what I can do just
> because the creators feared diamond inheritance.
> 

Not completely artificial. They made a design decision with the 
language, which could potentially create problems later.


Post a reply to this message

From: nemesis
Subject: Re: And today, C#
Date: 12 Feb 2008 12:24:54
Message: <47b1d666$1@news.povray.org>
Gail Shaw wrote:
> You don't have to. There's a free IDE (more than sufficient for trying stuff
> out) and the underlying framework and compiler are freely downloadable.
> There's more than enough docs, tuts and info on the net that you won't have
> to read a book if you don't want to.

yes, in no time you'll be hooked and badly shaking when away from it...


Post a reply to this message

From: Orchid XP v7
Subject: Re: And today, C#
Date: 12 Feb 2008 14:25:17
Message: <47b1f29d$1@news.povray.org>
Warp wrote:
> Mike Raiford <mra### [at] hotmailcom> wrote:
>> Ever attempted to use multiple inheritance in C++?
> 
>   Yes, I have needed it a few times. It's very handy.

For example, perhaps you want to define a matrix class which is a 
collection but also a number. [Or at least, you can do arithmetic on it. 
Depends on how the number classes are structured.]

There are other important examples. It gets quite awkward without MI.

>   Besides, it's not like two Java/C# interfaces couldn't have functions
> with same names...

Ah yes, the real WTF: Java's MI-but-not-MI doesn't even actually fix the 
problem! ;-)

>   I don't like languages which artificially limit what I can do just
> because the creators feared diamond inheritance.

I can understand that...

-- 
http://blog.orphi.me.uk/
http://www.zazzle.com/MathematicalOrchid*


Post a reply to this message

From: Orchid XP v7
Subject: Re: And today, C#
Date: 12 Feb 2008 14:27:46
Message: <47b1f332$1@news.povray.org>
Warp wrote:

>> "Multiple inheritance is not supported, although a class can implement 
>> any number of interfaces."
> 
>   I have never understood this, and never will. My question is: Why?

So, you can't have MI. OK, well that's a bit silly, but... Oh, but you 
can have "interfaces", which is just like MI, but... not. WTF?

OOC, have you ever looked at C# yourself?

-- 
http://blog.orphi.me.uk/
http://www.zazzle.com/MathematicalOrchid*


Post a reply to this message

From: Warp
Subject: Re: And today, C#
Date: 12 Feb 2008 14:48:54
Message: <47b1f826@news.povray.org>
Orchid XP v7 <voi### [at] devnull> wrote:
> OOC, have you ever looked at C# yourself?

  Not really. From what I understand, it's a kind of "C++ with the same
limitations as Java".

  Just the reason for its existence repulses me: Since Microsoft had to
abandon their own, standard-breaking version of Java because they lost
their battle against Sun about it (MS had to rename their version of the
language "J++"), they then developed a different language to compete with
Java. That language was C#.

  I don't even care if C# is a thousand times better than Java. I hate
it by principle and by extreme prejudice, and I'm not ashamed to admit it.

-- 
                                                          - Warp


Post a reply to this message

From: Orchid XP v7
Subject: Re: And today, C#
Date: 12 Feb 2008 14:51:00
Message: <47b1f8a4@news.povray.org>
Warp wrote:

>   I don't even care if C# is a thousand times better than Java. I hate
> it by principle and by extreme prejudice, and I'm not ashamed to admit it.

Heh. OK. I had a feeling that's kind of the answer I might get. ;-)

If I ever had round to actually playing with it, I'll let you know what 
I think... [Don't hold your breath though.]

-- 
http://blog.orphi.me.uk/
http://www.zazzle.com/MathematicalOrchid*


Post a reply to this message

From: Nicolas Alvarez
Subject: Re: And today, C#
Date: 12 Feb 2008 14:53:36
Message: <47b1f940$2@news.povray.org>
Warp escribió:
> MS had to rename their version of the language "J++")
> 

I think it's actually J#.

>   I don't even care if C# is a thousand times better than Java. I hate
> it by principle and by extreme prejudice, and I'm not ashamed to admit it.
> 

I know Java, and use it sometimes. I don't know C# and refuse to get 
anywhere close to .NET


Post a reply to this message

From: Orchid XP v7
Subject: Re: And today, C#
Date: 12 Feb 2008 14:58:14
Message: <47b1fa56$1@news.povray.org>
Nicolas Alvarez wrote:
> Warp escribió:
>> MS had to rename their version of the language "J++")
>>
> 
> I think it's actually J#.

No, I think J++ and J# are seperate languages. J++ is M$'s non-compliant 
"Java" VM, whereas J# is a Java-like language for the .NET framework.

> I know Java, and use it sometimes. I don't know C# and refuse to get 
> anywhere close to .NET

Likewise.

-- 
http://blog.orphi.me.uk/
http://www.zazzle.com/MathematicalOrchid*


Post a reply to this message

<<< Previous 10 Messages Goto Latest 10 Messages Next 10 Messages >>>

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