View mode: basic / threaded / horizontal-split · Log in · Help
April 24, 2004
Ok so how does D differ from Eiffel ?
Ok sorry for what might seem to some as obvious, I am a student struggling
with C++ and looking for a clean implementation of OOP Java might seem like
an obvious choice, but it has flaws like many other so called OOP languages
Eiffel seems to offer a clean implementation of OOP designed from the ground
up offering DBC like D, but lacks any real usage or support, D is just
starting out as a new language like C# all seem to offer similar benefits,
andclaim to offer speeds comparible to C/C++, I unfortunately do not have
time to read through pages of documentation to decide what to use and what
not to use, I was just about conviced about Eiffel when a friend said have
you looked at D?  No I replied what is D ?
I was given www.digitalmars.com and said read up on it.

I started to read, thought this looks interesting, infact looks very similar
to Eiffel in concept, but offers the opportunity to code like a C/C++
programmer just more cleanly. but since I have not learnt C/C++ properly it
would not matter too much to learn a different syntax, Eiffel offers what
might seem to some a very simple syntax, and comparing to some C/C++
programs very fast, but then again so does D, D seems to offer a syntax
similar to C/C++ to entice these programmers, but what else can it offer, I
notice there is DIDE which looks really cool but like Eifel it is a shame
there is no windows level gui editor like in VB, and what about support for
OLE DB or OpenGL, what support can D offer for database access like VB ( a
horrible language I know ) or for the games programmer, I think I understand
it is like C but since I have not learhnt C will it be hard to pick up? does
D model a true OOP language or is it yet another hybrid C ?

You thoughts are welcome in anticipation
Yeric
April 24, 2004
Re: Ok so how does D differ from Eiffel ?
IMHO There are two differences between D and Eiffel:
- technical differences:
For example, Eiffel offer true multiple inheritance, whereas D only offers
interface, probably because it is simpler to implement.

Some people dislike multiple inheritance, but I've never heard Eiffel users
complain about it, and I think that it is really handy for storing/retrieving
the object in an object-database.
The only thing good I can say about the interface compared to multiple
inheritance is that it is probably easier to implement, but to me, it looks like
a kludge..


- mindset differences: Eiffel never had a big following, probably because the
tools were expensive. Now there is SmartEiffel, but Eiffel has long lost its the
appeal. D is new so it still has the new 'kid on the block' factor for it.

I think that the choice of a computer language is like fashion: what's new is
cool..

Technically still D may have some advantages: does Eiffel support threads?

What would be interesting though would be a comparison of templates between
Eiffel and D? I seem to remember that templates in Eiffel were quite good, but
it has been a long time since I've read Meyer's book..
April 25, 2004
Re: Ok so how does D differ from Eiffel ?
> IMHO There are two differences between D and Eiffel:
> - technical differences:
> For example, Eiffel offer true multiple inheritance, whereas D only offers
> interface, probably because it is simpler to implement.
>

Sorry I was a bit beered up when I wrote this message, this is not meant to
be a TROLL message honestly! I am caught between a rock and a stone, C++ is
just too hard to master, sure I understand the basics, pointers I just about
understand, as long as it is nothing to do with arrays of pointers and
pointers to functions, maybe it is just me, I grasped Java quite well, but
it can execute slowly at times especially if it is not the only program
running, and load times for complex Java apps is too slow. VB seems simple,
but I dislike the error handling in VB it is almost as if it was an after
thought, and makes code very messy, in the end I wrote one huge class to
handle errors in VB which seems to work quite well, and it connects to
databases very nicely and I do like ADO, which is why I have been struggling
to get to grips with C++ but just haven't managed it in almost 6 months,
because VC++ also supports ADO, but since ADO is M$ specific, I do not think
I will find another programming language that will offer ADO support?

> Some people dislike multiple inheritance, but I've never heard Eiffel
users
> complain about it, and I think that it is really handy for
storing/retrieving
> the object in an object-database.
Multiple inheritance in C++ confuses the hell out of me, I have not looked
too deeply into this in Eiffel either, so D offeres a similar solution to
Java then offering multiple interfaces rather than multiple inheritance?

> The only thing good I can say about the interface compared to multiple
> inheritance is that it is probably easier to implement, but to me, it
looks like
> a kludge..
>
>
> - mindset differences: Eiffel never had a big following, probably because
the
> tools were expensive. Now there is SmartEiffel, but Eiffel has long lost
its the
> appeal. D is new so it still has the new 'kid on the block' factor for it.

True nearly 5k for a language can seem steep, especially for a student, but
they do now offer a free for non commercial use Eiffel studio and Eiffel
vision.
>
> I think that the choice of a computer language is like fashion: what's new
is
> cool..

Yes this is true, Next year I am doing a project on OOP and have to
implement it in an OOP language, which is why I have been trying to learnr
C++ because it executes fast, but it is so difficult to get right, if I had
just 1 pound for every null pointer exception I would not need to go to
college or work, I would be rich :)
>
> Technically still D may have some advantages: does Eiffel support threads?

I believe it does via an addon on library, but not too sure, as I have not
read all the ins and outs of this, I only knew about Eiffel because my tutor
mentioned it as I was struggling with C++ and I only know about D because I
use digitalmars C++ compiler that I bought some time ago, and every now and
then I check out the page and saw D started reading about it but there is a
lot to read.
I know it has a comparison page, but notice that Eiffel is missing from the
languages C# and Java are there, what would be useful is single page saying
D is the way forward because..... listing all its strengths as well as it's
weakness.
>
> What would be interesting though would be a comparison of templates
between
> Eiffel and D? I seem to remember that templates in Eiffel were quite good,
but
> it has been a long time since I've read Meyer's book..

Yes this would be good, Meyer's book OOSC2 is good, but again there is over
1000 pages, but in this case it is justified in most cases OO it self is a
huge beast to tackle yet according to Meyer it should be the easiest thing
for humans to master, because we already think in terms of objects and
abstraction naturally in real life, but the plethora of other programming
languages that evolved early on have reprogrammed our minds to not think
naturally, I have not read Meyers book yet, but this refers heavily to
Eiffel as I understand it.

Thanks for the info
Yeric
April 25, 2004
Re: Ok so how does D differ from Eiffel ?
Yeric schrieb:
> Sorry I was a bit beered up when I wrote this message, this is not meant to
> be a TROLL message honestly! I am caught between a rock and a stone, C++ is
> just too hard to master, sure I understand the basics, pointers I just about
> understand, as long as it is nothing to do with arrays of pointers and
> pointers to functions, maybe it is just me, I grasped Java quite well, but
> it can execute slowly at times especially if it is not the only program
> running, and load times for complex Java apps is too slow. VB seems simple,
> but I dislike the error handling in VB it is almost as if it was an after
> thought, and makes code very messy, in the end I wrote one huge class to
> handle errors in VB which seems to work quite well, and it connects to
> databases very nicely and I do like ADO, which is why I have been struggling
> to get to grips with C++ but just haven't managed it in almost 6 months,
> because VC++ also supports ADO, but since ADO is M$ specific, I do not think
> I will find another programming language that will offer ADO support?

I don't know what ADO is, but how is it acessed? Is there some library 
in C or C++ for it? If the source is available, you can compile it with 
DMD and then wrap it with SWIG/D.

> Multiple inheritance in C++ confuses the hell out of me, I have not looked
> too deeply into this in Eiffel either, so D offeres a similar solution to
> Java then offering multiple interfaces rather than multiple inheritance?

There is not much confusing in multiple inheritance in C++, apart from 
the hard-to-handle consequences of the things you should not do anyway. :>

The thing is, usual programming in C++ is not about knowing everything, 
it is about having morals. You must always create your own language you 
use within C++. That's where such books like Thinking In C++ come in 
handy, they teach you a well establiched moral, as well as give you a 
feeling of what might go wrong else.

>>The only thing good I can say about the interface compared to multiple
>>inheritance is that it is probably easier to implement, but to me, it 
>>looks like a kludge..

They are 2 different ways of thinking: Multiple Inheritance is 
self-sufficent in a rootless hierarchy, but forces you to separate your 
classes into "root hierarchy" and "mix-ins", or an arbitrary number of 
root hierarchies, which makes it hard to handle though.

Single inheritance is the right way where there's a root object, like in 
Java, D or Delphi. The root object "Object" defines a few behaviours, 
which can be redefined by descendant classes. If 2 branches both inherit 
from a root object, and then flow together in a single descendant, they 
may generate a conflict between the basic object behaviour. Though 
usually it is not as serious as it sounds, it is nontheless potentially 
bad and frankly unnnecessary. When D gets a sort of Mix-Ins (I think 
Mathew takes care of that), our hierarchy system is complete.

Sather has a single-inheritance based hierearachy with separated 
interfaces and mix-ins, although they call it "true" multiple 
inheritance. I mention Sather here because it is a descendant of Eiffel, 
and probably does things similarly. I have however not gotten to the 
details of Eiffel yet, because Eiffel causes me a headache. :> As 
opposed to Sather and C++.

> True nearly 5k for a language can seem steep, especially for a student, but
> they do now offer a free for non commercial use Eiffel studio and Eiffel
> vision.

You might want to look at Sather. Sather goes the line of Eiffel, but is 
a much simpler and somewhat more powerful language - don't believe any 
Eiffelheads when they start bashing on it, i can revide almost any of 
their arguments. It has not been used by anyone during the last 2 years. 
Maintainance has been almost none during the last 4. It is hosted on 
Savannah since a university did not want to take care of it. Read 100 
pages on Sather and you're a language expert. Read 100 pages of Eiffel 
and there's still too much to learn. However, there are too few 
libraries wrapped. However, SWIG support has been floating around. 
Anyway, if you are not prepared to wrap one or another C library, than D 
 is not (yet) for you, and forget Sather because it would cause too 
much work. Actually a pity. Preparing libraries to work in D is much 
less work than for Sather, because you don't have the huge syntax 
difference.

> Yes this is true, Next year I am doing a project on OOP and have to
> implement it in an OOP language, which is why I have been trying to learnr
> C++ because it executes fast, but it is so difficult to get right, if I had
> just 1 pound for every null pointer exception I would not need to go to
> college or work, I would be rich :)

You will be getting null pointer exceptions in D as well. :>>> But well, 
i would hope they would be more understandable or something.

> [...] I check out the page and saw D started reading about it but there is a
> lot to read.

Oh, it's done in one evening. Much faster than i can type in this 
answer. :> Besides, with good Java knowledge and some even superficial 
C++, you should have enough to master D wonderfully.

> I know it has a comparison page, but notice that Eiffel is missing from the
> languages C# and Java are there, what would be useful is single page saying
> D is the way forward because..... listing all its strengths as well as it's
> weakness.

The tabular language comparisons are always higly unfair - they expose 
only some spots on the surface and hide any detail.

> Yes this would be good, Meyer's book OOSC2 is good, but again there is over
> 1000 pages, but in this case it is justified in most cases OO it self is a
> huge beast to tackle yet according to Meyer it should be the easiest thing
> for humans to master, because we already think in terms of objects and
> abstraction naturally in real life, but the plethora of other programming
> languages that evolved early on have reprogrammed our minds to not think
> naturally, I have not read Meyers book yet, but this refers heavily to
> Eiffel as I understand it.

Uh-oh. Within 1000 pages you could wonderfully learn C++ as well. E.g. 
"Thinking in C++", first volume, from Bruce Eckel. It actually reads 
very esily.

-eye
April 25, 2004
Re: Ok so how does D differ from Eiffel ?
> > IMHO There are two differences between D and Eiffel:
> > - technical differences:
> > For example, Eiffel offer true multiple inheritance, whereas D only offers
> > interface, probably because it is simpler to implement.
> >
>
> Sorry I was a bit beered up when I wrote this message, this is not meant to
> be a TROLL message honestly! I am caught between a rock and a stone, C++ is
> just too hard to master, sure I understand the basics, pointers I just about
> understand, as long as it is nothing to do with arrays of pointers and
> pointers to functions, maybe it is just me,

[sorry I had to break mid-sentence, but ... don't you take a breath? <G>]

I love C++, and it's still the language I _think_ in, but I really struggle to
recommend it to people entering software engineering. This is really bad for me
since my first two books and most of my articles are on the subject. He he.

> I grasped Java quite well, but
> it can execute slowly at times especially if it is not the only program
> running, and load times for complex Java apps is too slow.

With the single domain of "enterprise applications" (websites, in other words),
Java is SH, no doubt about it.

> VB seems simple,
> but I dislike the error handling in VB it is almost as if it was an after
> thought,

It was

> and makes code very messy, in the end I wrote one huge class to
> handle errors in VB which seems to work quite well, and it connects to

Geez, man, give us a full stop [US-Trans: "period"] every now and then!

VB is a joke language, and no-one should be suggesting it to someone to learn as
a first language. I would consider that a deliberate sabotage of that person's
future in software engineering.

> databases very nicely and I do like ADO, which is why I have been struggling
> to get to grips with C++ but just haven't managed it in almost 6 months,
> because VC++ also supports ADO, but since ADO is M$ specific, I do not think
> I will find another programming language that will offer ADO support?

Don't get hooked on one database layer. Force yourself to learn at least two
different ones, as they're incredibly proprietary, and designed entirely for the
lock-in.

> > Some people dislike multiple inheritance, but I've never heard Eiffel
> users
> > complain about it, and I think that it is really handy for
> storing/retrieving
> > the object in an object-database.
> Multiple inheritance in C++ confuses the hell out of me, I have not looked
> too deeply into this in Eiffel either, so D offeres a similar solution to
> Java then offering multiple interfaces rather than multiple inheritance?

MI in C++ is simple: don't do it.

Except:
- tag base classes, such as the iterator tags and the like
- empty base classes, such as STL allocators
- interfaces (classes/structs composed of pure virtual functions, maybe static
functions, and *nothing else*).

The fact that these three things are absolutely essential, and *any* language
that does not have them is hamstrung by comparison, means that MI in C++ is a
great thing (as long as you don't use it for what it was intended for <G>).

> > The only thing good I can say about the interface compared to multiple
> > inheritance is that it is probably easier to implement, but to me, it
> looks like
> > a kludge..
> >
> >
> > - mindset differences: Eiffel never had a big following, probably because
> the
> > tools were expensive. Now there is SmartEiffel, but Eiffel has long lost
> its the
> > appeal. D is new so it still has the new 'kid on the block' factor for it.
>
> True nearly 5k for a language can seem steep, especially for a student, but
> they do now offer a free for non commercial use Eiffel studio and Eiffel
> vision.

Paying for a language is joke. Period [Rest of English speaking world-Trans:
"full stop"]


I have recently recommended D as one of two languages (the scripting language was
Ruby) to learn to a close friend who wants to dig a way out of FoxPro hell. I
think it is rapidly accelerating to a point of extreme usefulness. For example,
today I wrote a tool that I've wanted for years - a registry grepper - and it
only took me three hours. (The fact that D's Win32 registry module is of the
highest quality, cough cough, may have something to do with that.) Basically,
it's std.windows.registry and std.regexp, and just pure client code with no hacks
or workarounds. And it works a treat. (I'm going to submit it as a sample for
Phobos for the next release, or the one after maybe, depending on my desire to
polish.) I've shyed away from writing it in C++ or C# for years, purely because
of the effort in messing around with all the twiddly bits. But D ... 3 hours!

Learn D.
April 25, 2004
Re: Ok so how does D differ from Eiffel ?
> > Yes this would be good, Meyer's book OOSC2 is good, but again there is over
> > 1000 pages, but in this case it is justified in most cases OO it self is a
> > huge beast to tackle yet according to Meyer it should be the easiest thing
> > for humans to master, because we already think in terms of objects and
> > abstraction naturally in real life, but the plethora of other programming
> > languages that evolved early on have reprogrammed our minds to not think
> > naturally, I have not read Meyers book yet, but this refers heavily to
> > Eiffel as I understand it.
>
> Uh-oh. Within 1000 pages you could wonderfully learn C++ as well. E.g.
> "Thinking in C++", first volume, from Bruce Eckel. It actually reads
> very esily.

If you can wait until Sept/Oct, you can buy the forthcoming "Imperfect C++",
which some reviewers have called "an essential and _practical_ survival guide to
C++". :-)
April 25, 2004
Re: Ok so how does D differ from Eiffel ?
Matthew wrote:

>I love C++, and it's still the language I _think_ in, but I really struggle to
>recommend it to people entering software engineering. This is really bad for me
>since my first two books and most of my articles are on the subject. He he.
>
<snip>

>Learn D.
>

Yeah D is probably the best language to begin with before learning C++ <g>

-- 
-Anderson: http://badmama.com.au/~anderson/
April 25, 2004
Re: Ok so how does D differ from Eiffel ?
> I don't know what ADO is, but how is it acessed? Is there some library
> in C or C++ for it? If the source is available, you can compile it with
> DMD and then wrap it with SWIG/D.

ADO = ActiveX Data Objects A Microsoft library designed to plug into VB and
VC++, I believe it has a COM interface as well, used to acees and manipulate
recordsets in databases either OLE DB or ODBC, providing a nice abstraction
layer to avoid exposing mere mortals to the complexities of ODBC and OLE DB
Raw :)
>
> There is not much confusing in multiple inheritance in C++, apart from
> the hard-to-handle consequences of the things you should not do anyway. :>

Oh I see it does not matter how many times I read the section on MI I just
do not get it :( and I haver been reading the excellent Bruce Eckel Book
Thinking in C++ 2nd Edition Volume One, and yes I agree it is one of the
easier books to understand, but I think I do not fully understand OO yet I
understand the concept just not the implementation :(

> They are 2 different ways of thinking: Multiple Inheritance is
> self-sufficent in a rootless hierarchy, but forces you to separate your
> classes into "root hierarchy" and "mix-ins", or an arbitrary number of
> root hierarchies, which makes it hard to handle though.
>
> Single inheritance is the right way where there's a root object, like in
> Java, D or Delphi. The root object "Object" defines a few behaviours,
> which can be redefined by descendant classes. If 2 branches both inherit
> from a root object, and then flow together in a single descendant, they
> may generate a conflict between the basic object behaviour. Though
> usually it is not as serious as it sounds, it is nontheless potentially
> bad and frankly unnnecessary. When D gets a sort of Mix-Ins (I think
> Mathew takes care of that), our hierarchy system is complete.
>

So essentially Single Inheritance is ok, and not the really bad thing it is
made out to be in MI languages ?


> Sather has a single-inheritance based hierearachy with separated
> interfaces and mix-ins, although they call it "true" multiple
> inheritance. I mention Sather here because it is a descendant of Eiffel,
> and probably does things similarly. I have however not gotten to the
> details of Eiffel yet, because Eiffel causes me a headache. :> As
> opposed to Sather and C++.

I have never heard of Sather until now
C++ would be fine if I could understand it all, but you mention that this is
not neccessary, I guess you are right, when I look back on my VB days I did
not read the whole book instead knocked up a couple of forms add some crude
code to the button and comboboxes and I got a working app, the error
handling code came afterwards <g> and cover almost if not more coding than
the actual app, unless I had a single on error routine in main that printed
cryptic error messages in err.description, eventually I could map certain
error numbers to actual things and this is where it got messy with a
plethora of select case statements it was hideous, eventually I moved this
code to a seperate module set as public, and then eventually wrapped it all
up in a class.

>
> > True nearly 5k for a language can seem steep, especially for a student,
but
> > they do now offer a free for non commercial use Eiffel studio and Eiffel
> > vision.
>
> You might want to look at Sather. Sather goes the line of Eiffel, but is
> a much simpler and somewhat more powerful language - don't believe any
> Eiffelheads when they start bashing on it, i can revide almost any of
> their arguments. It has not been used by anyone during the last 2 years.
> Maintainance has been almost none during the last 4. It is hosted on
> Savannah since a university did not want to take care of it. Read 100
> pages on Sather and you're a language expert. Read 100 pages of Eiffel
> and there's still too much to learn. However, there are too few
> libraries wrapped. However, SWIG support has been floating around.
> Anyway, if you are not prepared to wrap one or another C library, than D
>   is not (yet) for you, and forget Sather because it would cause too
> much work. Actually a pity. Preparing libraries to work in D is much
> less work than for Sather, because you don't have the huge syntax
> difference.

You mention library wrapping, but is this only possible if you have the
source code ?? I doubt any source code exists for Microsoft products ?
>
>
> You will be getting null pointer exceptions in D as well. :>>> But well,
> i would hope they would be more understandable or something.

Me too
>
> Oh, it's done in one evening. Much faster than i can type in this
> answer. :> Besides, with good Java knowledge and some even superficial
> C++, you should have enough to master D wonderfully.
>

He he famous last words, Is there a gui designer for D yet, is there one
planned in the future? I laugh everytime I read about VC++ I just cant see
what is visual about it where is the nice gui designer like you get with VB
?

>
> The tabular language comparisons are always higly unfair - they expose
> only some spots on the surface and hide any detail.
>

> Uh-oh. Within 1000 pages you could wonderfully learn C++ as well. E.g.
> "Thinking in C++", first volume, from Bruce Eckel. It actually reads
> very esily.
>
> -eye

Thanks for the insight
April 25, 2004
Re: Ok so how does D differ from Eiffel ?
Yeric wrote:

>He he famous last words, Is there a gui designer for D yet, is there one
>planned in the future? I laugh everytime I read about VC++ I just cant see
>what is visual about it where is the nice gui designer like you get with VB
>?
>  
>
There is a GUI designer in VC++ as part of MFC, but it's not nice like VB's.


-- 
-Anderson: http://badmama.com.au/~anderson/
April 25, 2004
Re: Ok so how does D differ from Eiffel ?
>
> [sorry I had to break mid-sentence, but ... don't you take a breath? <G>]

he he no, I can actually type faster than I can speak or think :)
>
> I love C++, and it's still the language I _think_ in, but I really
struggle to
> recommend it to people entering software engineering. This is really bad
for me
> since my first two books and most of my articles are on the subject. He
he.
>

So what might you recommend ?

> With the single domain of "enterprise applications" (websites, in other
words),
> Java is SH, no doubt about it.

I agree, which was its primary function I believe ?

> Geez, man, give us a full stop [US-Trans: "period"] every now and then!
Ok . <g>
>
> VB is a joke language, and no-one should be suggesting it to someone to
learn as
> a first language. I would consider that a deliberate sabotage of that
person's
> future in software engineering.

I agree, it allows anyone with little programming knowledge to program
(badly)

> Don't get hooked on one database layer. Force yourself to learn at least
two
> different ones, as they're incredibly proprietary, and designed entirely
for the
> lock-in.

Is this not the case with all M$ products. <-- note the full stop or period
<g>
>
> MI in C++ is simple: don't do it.


>
> Except:
>  - tag base classes, such as the iterator tags and the like
>  - empty base classes, such as STL allocators
>  - interfaces (classes/structs composed of pure virtual functions, maybe
static
> functions, and *nothing else*).
>
> The fact that these three things are absolutely essential, and *any*
language
> that does not have them is hamstrung by comparison, means that MI in C++
is a
> great thing (as long as you don't use it for what it was intended for
<G>).

He he sounds familiar

>
> Paying for a language is joke. Period [Rest of English speaking
world-Trans:
> "full stop"]

?? I think it is only fair that someone who has spent a lot of time and
effort developing something
useful should be paid for it if they want, but this would depend if it was
good enough in
the first place :)


>
>
> I have recently recommended D as one of two languages (the scripting
language was
> Ruby) to learn to a close friend who wants to dig a way out of FoxPro
hell. I
> think it is rapidly accelerating to a point of extreme usefulness. For
example,
> today I wrote a tool that I've wanted for years - a registry grepper - and
it
> only took me three hours. (The fact that D's Win32 registry module is of
the
> highest quality, cough cough, may have something to do with that.)
Basically,
> it's std.windows.registry and std.regexp, and just pure client code with
no hacks
> or workarounds. And it works a treat. (I'm going to submit it as a sample
for
> Phobos for the next release, or the one after maybe, depending on my
desire to
> polish.) I've shyed away from writing it in C++ or C# for years, purely
because
> of the effort in messing around with all the twiddly bits. But D ... 3
hours!
>
> Learn D.
>
>

And of course this is a completely unbiased answer :)
Perhaps you are right, doing is learning, I have often found this to be the
case
However I have twice in VB used this method od doing is learning, only to
find
I have written something that already existed in the library. <-- note the
period again [Full Stop] <g>

Thanks
Yeric
« First   ‹ Prev
1 2 3
Top | Discussion index | About this forum | D home