 |
 |
|
 |
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
C# is a strange mix of Delphi's ideas and Java syntax and implementation. The
main designer and his team was bought by M$ from Borland where they worked on
Delphi. In fact, he was also Turbopascal implementer.
BTW, Orchid, you know some major Haskell designers and implementers work for M$,
right? Simon Peyton Jones works at M$ Research, long after he started work on
Haskell. Erik Meijer too. The thing is, many ideas of Haskell, like monadic
IO are present in .NET nowadays in a builtin framework named LINK.
You may find the ideas of Erik Meijer somewhat interesting:
http://research.microsoft.com/~emeijer/Papers/fpca91.pdf
http://research.microsoft.com/~emeijer/
the first paper is interesting, but Meijer is an idiosyncratic personality with
strong opinions. In his view, Haskell is just a scripting language... ;)
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Mike Raiford wrote:
> Invisible wrote:
>
>> ...so they implemented Java's flawed MI-but-not-MI model? How is that
>> fixing the flaws from other major programming languages?
>
> Ever attempted to use multiple inheritance in C++?
No.
Given that I can't handle C and C++ is more complicated, I figured it
was just a bad idea. ;-)
> Things get really
> interesting when you have more than one base class, and some members
> overlap.
Ever tried to use multiple inheritance in Eiffel?
Since I am presumably the only person here who has ever heard of Eiffel,
let me go over it.
Suppose that class A inherits from classes B and C, which themselves
inherit from D. Suppose that D defines an attribute called, say, banana.
That means that B and C each have a copy of banana. In A, these two
copies are automatically merged by default.
Alternatively, you can rename one (or both) copies to something else.
Stop and think about that for a moment.
Suppose I rename the banan from B to banana_b and the other to banana_c.
That means that anybody who tries to access "banana" through the B
interface actually gets banana_b, anybody trying to access "banana"
through the C interface gets banana_c instead, and anybody trying to
access the A interface directly can see two seperate bananas. A similar
thing happens with methods. [Except that you can override both inherited
methods, or rename one, or...]
It's funny really. Eiffel's slogan is "Simple. Elegant. Powerful." That
first is *highly* debatable...
> Use C# for a while, especially the newer version (3.0) It's actually
> quite nice. I've sort of grown to like it since I've started actually
> using it. C++ish syntax, some stuff borrowed from Java.
It sounds like it's fixed a few of the things that makes C and C++ so
impossible. I'm still not sure I'd like it very much. [And I'm certainly
not keen to shell out money to find out.]
--
http://blog.orphi.me.uk/
http://www.zazzle.com/MathematicalOrchid*
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
> Since I am presumably the only person here who has ever heard of Eiffel,
> let me go over it.
>
I heard of it. I know some of its features. I have never used it, and
don't even know what the syntax looks like.
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
"Invisible" <voi### [at] dev null> wrote in message
news:47b1c6c2$1@news.povray.org...
>
> It sounds like it's fixed a few of the things that makes C and C++ so
> impossible. I'm still not sure I'd like it very much. [And I'm certainly
> not keen to shell out money to find out.]
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.
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
"Nicolas Alvarez" <nic### [at] gmail is the best com> wrote in message
news:47b1c743$1@news.povray.org...
> > Since I am presumably the only person here who has ever heard of Eiffel,
> > let me go over it.
> >
>
> I heard of it. I know some of its features. I have never used it, and
> don't even know what the syntax looks like.
Very much like C++ or Java at a first glance.
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
nemesis wrote:
> C# is a strange mix of Delphi's ideas and Java syntax and implementation. The
> main designer and his team was bought by M$ from Borland where they worked on
> Delphi. In fact, he was also Turbopascal implementer.
Mmm, I wonder if C# is any more object-oriented than TP 5.5? ;-)
> BTW, Orchid, you know some major Haskell designers and implementers work for M$,
> right?
*sigh* Yes.
Indeed, everything I mention M$ I get flamed for insulting people's
employer.
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?
> The thing is, many ideas of Haskell, like monadic
> IO are present in .NET nowadays in a builtin framework named LINK.
Yeah, looking at the Wikipedia page for C# I see they've stolen a whole
crapload of good ideas from Haskell. [No doubt in a few years everybody
will say how C# is the best programming language because of these
features. And Haskell still isn't the best. For the same reason.]
> the first paper is interesting, but Meijer is an idiosyncratic personality with
> strong opinions. In his view, Haskell is just a scripting language... ;)
Oh, sure. It has compilation, strong typing, compile-time error
checking, pervasive optimisation techniques, and an elegant underlying
algebra. Definitely a scripting language. :-P
--
http://blog.orphi.me.uk/
http://www.zazzle.com/MathematicalOrchid*
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Gail Shaw wrote:
>> I heard of it. I know some of its features. I have never used it, and
>> don't even know what the syntax looks like.
>
> Very much like C++ or Java at a first glance.
Er, what?
class
HELLO_WORLD
create
make
feature
make
do
print("Hello, world!%N")
end
end
Sure, looks just like C++ or Java. ;-)
[Actually, I think Pascal would be closer... Unlike certain other
languages, the syntax is more heavy on language keywords than exotic
punctuation.]
--
http://blog.orphi.me.uk/
http://www.zazzle.com/MathematicalOrchid*
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
"Invisible" <voi### [at] dev null> wrote in message
news:47b1cbd9$1@news.povray.org...
> Gail Shaw wrote:
>
> >> I heard of it. I know some of its features. I have never used it, and
> >> don't even know what the syntax looks like.
> >
> > Very much like C++ or Java at a first glance.
>
> Er, what?
Sorry. Misread. Thought he was talking about C#
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Gail Shaw wrote:
>> Er, what?
>
> Sorry. Misread. Thought he was talking about C#
Ah. OK. Well I guess this *is* a C# thread. ;-)
--
http://blog.orphi.me.uk/
http://www.zazzle.com/MathematicalOrchid*
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Mike Raiford <mra### [at] hotmail com> wrote:
> Ever attempted to use multiple inheritance in C++?
Yes, I have needed it a few times. It's very handy.
For example, recently I have been programming in a system where there
are basically two widget managers, each with their own widget types.
Both widget types have data inside them (such as their geometry) as
well as member functions. These widgets *need* those data members in
order to function properly.
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.)
> Things get really
> interesting when you have more than one base class, and some members
> overlap.
Ambiguity problems may sometimes happen, but rarely, and when they do,
it's seldom a problem.
If, for example, both base classes have a function with the same name
and you need to call it for a derived class, you simply specify which
one should be called. It's basically no different than if the functions
in the base classes were named differently.
Besides, it's not like two Java/C# interfaces couldn't have functions
with same names... (Ok, I have to admit that I don't know if they can,
but I assume they do.) This is not a problem exclusive to C++.
> There are other issues, of course, such as which copy of the
> base class is used when 2 classes share a common base class and are
> inherited by a further derived class. (Looks like a diamond on an
> inheritance diagram)
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.
> Use C# for a while, especially the newer version (3.0) It's actually
> quite nice. I've sort of grown to like it since I've started actually
> using it. C++ish syntax, some stuff borrowed from Java.
I don't like languages which artificially limit what I can do just
because the creators feared diamond inheritance.
(I have never understood, and never will understand why they disallow
multiple inheritance *completely* given that the only problem they fear
is *diamond inheritance*. Why not disallow diamond inheritance? That
would solve the problem.)
--
- Warp
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|
 |