Linked by Thom Holwerda on Sat 26th Nov 2005 17:02 UTC, submitted by Megatux
Gnome "I followed the debate about a successor for the C/C++ combination as the primary language for developing the GNOME core desktop platform very closely last month. There has been discussion about a number of options. What I would like to do on this page is give an overview how a probably less well-known language might be a viable compromise as a C/C++ successor. This language is called Eiffel and exists for over a decade. Eiffel takes the principle of Object-Oriented programming to its extremes and, as a consequence, is a very easy to learn language."
Thread beginning with comment 65108
To view parent comment, click here.
To read all comments associated with this story, please click here.
Member since:

""Code in Eiffel is written with Design by Contract. This is a vaccine against bugs. "
From my brief readings onf wikipedia. It looks to me like DBC is a runtime check that validates the IO of your function calls? I guarantee that'd cause slow downs...

Think of it more as built in unit testing, without the hassle of having to write seperate tests (it's baked into the code itself, and _all_ code needs unit tests). I read the wiki as's pretty vague. Read this link for a much more thorough examination of DBC:

At it's root, DBC is more closely aligned to test driven development than anything else.

Reply Parent Score: 1

ma_d Member since:

It looks like exception handling to me. It just formalizes the way you'd write out the code procedurally...

I suppose it's nice to force programmers to do tests, but I don't like being forced into things.

Reply Parent Score: 1

jayson.knight Member since:

But if it does what it promises (and I'm not an Eiffel expert so who knows) by reducing the number of bugs, wouldn't you *want* to do something like that? A few extra LOC for less bugs is well worth it IMO.

From the DBC wiki:

"The contract conditions should never be violated in program execution: thus, they can be either left in as debugging code, or removed from the code altogether for performance reasons."

I wonder if the Eiffel compiler has a "release" mode configuration (either built in or configurable via switches) that strips out the DBC code after testing is complete...i.e. I would never ship production code with unit tests compiled in as well (for obvious perf reasons), though in a "debug" release the unit tests would be left in the code.

Reply Parent Score: 1

Member since:

"I suppose it's nice to force programmers to do tests, but I don't like being forced into things."

And that's why programming is still behind. No one wants to be "forced" into doing what needs to be done, and at best have to learn the hard way, and at worst never do.

Reply Parent Score: 1