www.digitalmars.com         C & C++   DMDScript  

D - Ok so how does D differ from Eiffel ?

reply "Yeric" <someone somewhere.com> writes:
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
Apr 24 2004
parent reply renZYX hotmail.com writes:
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..
Apr 24 2004
parent reply "Yeric" <someone somewhere.com> writes:
 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

 complain about it, and I think that it is really handy for

 the object in an object-database.

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

 a kludge..


 - mindset differences: Eiffel never had a big following, probably because

 tools were expensive. Now there is SmartEiffel, but Eiffel has long lost

 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

 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

 Eiffel and D? I seem to remember that templates in Eiffel were quite good,

 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
Apr 25 2004
next sibling parent reply Ilya Minkov <minkov cs.tum.edu> writes:
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
Apr 25 2004
next sibling parent "Matthew" <matthew.hat stlsoft.dot.org> writes:
 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++". :-)
Apr 25 2004
prev sibling parent reply "Yeric" <someone somewhere.com> writes:
 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,


 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
Apr 25 2004
next sibling parent reply J Anderson <REMOVEanderson badmama.com.au> writes:
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
?
  

-- -Anderson: http://badmama.com.au/~anderson/
Apr 25 2004
parent reply "Yeric" <someone somewhere.com> writes:
 There is a GUI designer in VC++ as part of MFC, but it's not nice like

There is an excuse for one <g> but I have not used it, I have been trying to learn the core language first then go onto windows programming.
Apr 25 2004
parent reply J Anderson <REMOVEanderson badmama.com.au> writes:
Yeric wrote:

There is a GUI designer in VC++ as part of MFC, but it's not nice like
    

There is an excuse for one <g> but I have not used it, I have been trying to learn the core language first then go onto windows programming.

-- -Anderson: http://badmama.com.au/~anderson/
Apr 25 2004
parent reply "Vathix" <vathix dprogramming.com> writes:
"J Anderson" <REMOVEanderson badmama.com.au> wrote in message
news:c6gong$2b4n$2 digitaldaemon.com...
 Yeric wrote:

There is a GUI designer in VC++ as part of MFC, but it's not nice like

There is an excuse for one <g> but I have not used it, I have been trying


learn the core language first then go onto windows programming.

--

You don't need to use MFC to use VC++'s GUI designer. Add a dialog resource to your non-MFC project; you just can't use the class wizard stuff because you have to manually setup a dialog callback procedure and use CreateDialog() or DialogBox(). -- Christopher E. Miller
Apr 25 2004
parent J Anderson <REMOVEanderson badmama.com.au> writes:
Vathix wrote:

You don't need to use MFC to use VC++'s GUI designer. Add a dialog resource
to your non-MFC project; you just can't use the class wizard stuff because
you have to manually setup a dialog callback procedure and use
CreateDialog() or DialogBox().

macros and ditchs. -- -Anderson: http://badmama.com.au/~anderson/
Apr 25 2004
prev sibling parent Ilya Minkov <minkov cs.tum.edu> writes:
Yeric schrieb:
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 :)

Ok, so it's ActiveX. ActiveX is COM, COM is supported in D through interface. As far as i know, it is possible to query an installed COM object of its interface, this can be used to generate a D imports file, as well as to make a User Interface editor, which would work with COM objects and output D source. However, it takes someone who knows something about COM - and that is definately not me.
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 :(

Then i have to agree to Mathew, who just said basically the same as i did, just *much* better.
 So essentially Single Inheritance is ok, and not the really bad thing it is
 made out to be in MI languages ?

True, because it is always not simple single inheritance we have. And D might make one step further.
 I have never heard of Sather until now

Because it has too few friends to support it. :/ Pity for a fine high performance high safety no-nonsense language.
 You mention library wrapping, but is this only possible if you have the
 source code ?? I doubt any source code exists for Microsoft products ?

Library wrapping requieres that you have a way to call the code from the source language. For example, Sather/C can embed tiny pieces of C code which are passed as they are to the compiler. Sather/Java can call Java classes directly, if you describe their interface in Java syntax first, and Sather/C also has this sort of thing. D can call C code directly, but you also have to describe its interface in D syntax. There is one limitation though: can you call this C code from the corresponding C compiler? Sather/C is known to work with GCC, and can probably be made work with other C compilers. DigitalMars D compiler works only with DigitalMars C because of pecularities of a linking format. There is also Gnu D compiler, which works with GCC. But beware: there might be libraries which are available only for MSVC, and then you're trapped. C++ libraries requiere 2 additional levels of wrapping - since other languages cannot call C++ code, you have to wrap it into C function calls, import them into target language (e.g. D), and wrap them into D code which looks and behaves like C++ code. There is a tool called SWIG developed for Python, Sather, and many other languages, which does all of these steps automatically. Andy has written a module for it which works with D. (http://andy.tadan.us/d/)
 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
 ?

Oh, it will take a long, long way until we have one. It involves parsing D code and generating auto-bindings. But for ActiveX based developement only, i would think one could be written quite easily, but i can't say for sure since i don't know much about COM.
 Thanks for the insight

You're welcome! -eye
Apr 25 2004
prev sibling parent reply "Matthew" <matthew.hat stlsoft.dot.org> writes:
 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

 complain about it, and I think that it is really handy for

 the object in an object-database.

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

 a kludge..


 - mindset differences: Eiffel never had a big following, probably because

 tools were expensive. Now there is SmartEiffel, but Eiffel has long lost

 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.
Apr 25 2004
next sibling parent reply J Anderson <REMOVEanderson badmama.com.au> writes:
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.

Learn D.

Yeah D is probably the best language to begin with before learning C++ <g> -- -Anderson: http://badmama.com.au/~anderson/
Apr 25 2004
parent reply "Yeric" <someone somewhere.com> writes:
Learn D.

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

Ok ok I get the picture ;) but is there a book yet that for D apart from the D the language <g> . Yeric
Apr 25 2004
parent J Anderson <REMOVEanderson badmama.com.au> writes:
Yeric wrote:

Ok ok I get the picture ;) but is there a book yet that for D apart from the
D the language <g> .
  

This group is a good resource. A book on C++ or java (that doesn't discuss the libraries) is probably one course of action to learning D. I do think, however that the best way to learn a language is by doing and looking at what others have done. There are plenty of D tutorials around. You should check out the wiki (http://www.prowiki.org/wiki4d/wiki.cgi?FrontPage) and dsource (http://www.dsource.org/tutorials/). Best thing to so is to imagine something and then try to do it. When you get stuck ask this newsgroup or even chat on the D ICQ group - irc.dprogramming.com #D.
Yeric
  

-- -Anderson: http://badmama.com.au/~anderson/
Apr 25 2004
prev sibling next sibling parent reply "Yeric" <someone somewhere.com> writes:
 [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

 recommend it to people entering software engineering. This is really bad

 since my first two books and most of my articles are on the subject. He


So what might you recommend ?
 With the single domain of "enterprise applications" (websites, in other

 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!

 VB is a joke language, and no-one should be suggesting it to someone to

 a first language. I would consider that a deliberate sabotage of that

 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

 different ones, as they're incredibly proprietary, and designed entirely

 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

 functions, and *nothing else*).

 The fact that these three things are absolutely essential, and *any*

 that does not have them is hamstrung by comparison, means that MI in C++

 great thing (as long as you don't use it for what it was intended for

He he sounds familiar
 Paying for a language is joke. Period [Rest of English speaking

 "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

 Ruby) to learn to a close friend who wants to dig a way out of FoxPro

 think it is rapidly accelerating to a point of extreme usefulness. For

 today I wrote a tool that I've wanted for years - a registry grepper - and

 only took me three hours. (The fact that D's Win32 registry module is of

 highest quality, cough cough, may have something to do with that.)

 it's std.windows.registry and std.regexp, and just pure client code with

 or workarounds. And it works a treat. (I'm going to submit it as a sample

 Phobos for the next release, or the one after maybe, depending on my

 polish.) I've shyed away from writing it in C++ or C# for years, purely

 of the effort in messing around with all the twiddly bits. But D ... 3

 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
Apr 25 2004
next sibling parent reply "Unknown W. Brackets" <unknown at.simplemachines.dot.org> writes:
Yeric wrote:
 ?? 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 :)

Yes and no. I think the biggest problem here is that so many programming languages are free... so a language would have to be spectacularly good to not be. Even Microsoft recently released their optimized compiler for free - and before that they were offering a compiler for free. I, myself, write open source (well, not always GPL, but pretty close...) projects which are all free. I have spent hours upon hours (in fact, a year's worth of hours!) on this - and I've never asked any money... although we (the team I work with) do offer a paid priority support option. So, I'm not just a freeloader saying everything should be free. Rather, I think programming is an "academic" enough thing that it's more like science than retail. Unless I'm mistaken, this is the rough view point of most open source people. Instead of paying for the software, you "pay" by giving back and contributing things like libraries, contructive comments, and support for the software. Again as someone who provides open source software to thousands across the world, I get more enjoyment out of seeing people happy with my software, helping others or contributing in other ways, than I would by getting $50/hour for programming. (which is my usual rate for hardware or technical support when in person... and would make me a very, very rich man.) But, I didn't write Eiffel, nor have I ever used it. Maybe it is worth however much is being charged for it... maybe the author(s) don't get the same joy out of seeing their users use it. -[Unknown]
Apr 25 2004
parent "Yeric" <someone somewhere.com> writes:
 Yes and no.  I think the biggest problem here is that so many
 programming languages are free... so a language would have to be
 spectacularly good to not be.

He he so how do M$ sleep at night asking people to pay for things like VB <g>
 Even Microsoft recently released their optimized compiler for free - and
 before that they were offering a compiler for free.

Yes this surprised me too but then again all their .Net is free if you download the SDK
 I, myself, write open source (well, not always GPL, but pretty close...)
 projects which are all free.  I have spent hours upon hours (in fact, a
 year's worth of hours!) on this - and I've never asked any money...
 although we (the team I work with) do offer a paid priority support

Then you have my respect, I admire Open Source and the principles behind it, if I could write anything useful right now, I would give it to open source if it was good enough, since I have used many Open source tools including GCC, alas at the moment I am struggling period.
 So, I'm not just a freeloader saying everything should be free.  Rather,
 I think programming is an "academic" enough thing that it's more like
 science than retail.

Programming is a way of life :) even though I am not a guru yet, I enjoy it like some people like golf
 Unless I'm mistaken, this is the rough view point of most open source
 people.  Instead of paying for the software, you "pay" by giving back
 and contributing things like libraries, contructive comments, and
 support for the software.

This is precisley the reason Open source exists to spread the knowledge among mortals to learn instead of keeping it to a chosen few.
 Again as someone who provides open source software to thousands across
 the world, I get more enjoyment out of seeing people happy with my
 software, helping others or contributing in other ways, than I would by
 getting $50/hour for programming. (which is my usual rate for hardware
 or technical support when in person... and would make me a very, very
 rich man.)

coding makes me happy too I enjoy the challenge of transferring my ideas into another language not unlike foreigh translator in some ways.
 But, I didn't write Eiffel, nor have I ever used it.  Maybe it is worth
 however much is being charged for it... maybe the author(s) don't get
 the same joy out of seeing their users use it.

Perhaps it is, I might not have heard of it if it were not for my tutor mentioning it i believe there are many programming languages out there it is just that C/C++ and Java hold the limelight. I only know of D because I have the DM C++ compiler if it were not for that I would never have known, I am going to let my tutor read up on it he is an old Unix Guru and loves new programming languages I am sure he will be interested in D. I myself do not understand enought to pass judgement, but if it delivers half of what it says then I will use it. Now whether it is yet complete enough to do my OO project in I do not know, from what I have read then I think it is, it might be missing certain things that I do not know about anyhow. Yeric
Apr 25 2004
prev sibling parent "Matthew" <matthew.hat stlsoft.dot.org> writes:
 [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 know where you're coming from. ;)
 I love C++, and it's still the language I _think_ in, but I really

 recommend it to people entering software engineering. This is really bad

 since my first two books and most of my articles are on the subject. He


So what might you recommend ?

D and Ruby
 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

 a first language. I would consider that a deliberate sabotage of that

 future in software engineering.

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

Exactly. The same can be said of .NET to some degree - I've certainly seen it abused in commercial developments.
 Don't get hooked on one database layer. Force yourself to learn at least

 different ones, as they're incredibly proprietary, and designed entirely

 lock-in.

Is this not the case with all M$ products. <-- note the full stop or period <g>

With almost all (VC++ 7.1 is pretty conformant.)
 Paying for a language is joke. Period [Rest of English speaking

 "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 :)

If they want it to succeed, they can't charge for the language. Just the consultancy fees a couple of years down the line.
 I have recently recommended D as one of two languages (the scripting

 Ruby) to learn to a close friend who wants to dig a way out of FoxPro

 think it is rapidly accelerating to a point of extreme usefulness. For

 today I wrote a tool that I've wanted for years - a registry grepper - and

 only took me three hours. (The fact that D's Win32 registry module is of

 highest quality, cough cough, may have something to do with that.)

 it's std.windows.registry and std.regexp, and just pure client code with

 or workarounds. And it works a treat. (I'm going to submit it as a sample

 Phobos for the next release, or the one after maybe, depending on my

 polish.) I've shyed away from writing it in C++ or C# for years, purely

 of the effort in messing around with all the twiddly bits. But D ... 3

 Learn D.

And of course this is a completely unbiased answer :)

It is. First and foremost I'm a C++ programmer, and probably always will be. I also work with C#/.NET, Java, C, Perl, Python and Ruby. D is the language I would recommend to someone learning a compiled language, and Ruby for a scripting one.
 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

You're welcome
Apr 25 2004
prev sibling parent reply "Scott Egan" <scotte tpg.com.aux> writes:
Matthew,

firstly I'll try and maintain a judicious use of full-stops.  There how's
that, there's one already ;)

Don't be too quick to bag MI.  I remember many moons ago using the Borland
Windows Framework (can't even remember what it's called now; but it beat MFC
hands down).

There were two window types: a MID Child and a Decorated Frame.  I wanted a
Decorated MDI Child; so I just derived from both and... It worked!

Mind you that's about the only time I remember using MI - maybe you're
correct after all ;)

Regards,

Scott



"Matthew" <matthew.hat stlsoft.dot.org> wrote in message
news:c6ggia$1u5a$1 digitaldaemon.com...
....
 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

 functions, and *nothing else*).

Apr 26 2004
next sibling parent "Yeric" <NOSPAM NOSPAM.com> writes:
 Don't be too quick to bag MI.  I remember many moons ago using the Borland
 Windows Framework (can't even remember what it's called now; but it beat

 hands down).

?
Apr 26 2004
prev sibling parent Ilya Minkov <minkov cs.tum.edu> writes:
Scott Egan schrieb:
 There were two window types: a MID Child and a Decorated Frame.  I wanted a
 Decorated MDI Child; so I just derived from both and... It worked!
 
 Mind you that's about the only time I remember using MI - maybe you're
 correct after all ;)

Humm. MDI child may be part of single-inheritance hierarchy, decorated frame may be a mix-in? Anyway, the Borland people have foreseen something in their library, and with smart library writers it can be done with single-inheritance and mix-ins as well... Not so sure. After the first step is done, we could think of how to unify a single-root hierarchy and multiple inheritance and stuff - perhaps it will happen almost automatically with template classes... Sather has been smart in the respect: there is no true multiple inheritance (but instead template+interface inheritance), and a single root. It is not true multiple inheritance, because you cannot combine 2 objects at will, since they will invariably collide on the root object methods. Collisions as such can be resolved though, by using a method renaming feature. The language has some interesting solutions. And it's targetted as a high-performance static rapid prototyping lang - which explains the "hackish" way of programming close to Python. -eye
Apr 26 2004