Hacker News new | ask | show | jobs
by bromuk 1361 days ago
Did anyone else get taught Eiffel (by Bertrand) when they were at University? Such a cool little language for teaching object oriented paradigms. I think multiple inheritance was it's selling point, never seen it in industry though lol.
5 comments

Yes, at ETH Zürich. I'm not a big fan of Eiffel, but pre- & postconditions + invariants are a great way to verify simple functions in isolation. Still needs integration and end-to-end tests to verify sufficient correctness in a complex distributed environment. On top of that, I really don't like strong OOP. It can be misused so easily. Multiple inheritance sounds good in theory, but just based on some Java inheritance code nightmares I've seen in my career so far, think 10s of layers of deep nesting done by misusing inheritance; multiple inheritance would massively overcomplicate many codebases. I'm very happy the industry seems to move into a pragmatic middle ground, where both lightweight OOP and lightweight FP have their uses.
I never quite got it. We used it for a number of things back in the late 90s but to have all of the condition checking enabled made it run much slower, which was like most other languages at the time, you tested in debug and then released it in release mode.

Also, in reference to Ariane rocket explosion (https://en.wikipedia.org/wiki/Ariane_flight_V88) due to interger overflow, it wasn't clear how a precondition would have saved anything - an assertion made by Meyer. If it got to the relevant method and the precondition failed, you would still have to have forseen the possibility of error and coded for it, otherwise it might not have run the function but could still have catastrophically failed.

I did! It was not even _that_ long ago. I remember fondly reading the Eiffel book by Meyer, which was lenghty but full of interest tidbits and explanations.

However, using the language itself was a different story. This must have been around 2009. There was barely any documentation online, not to speak of libraries. One project required us to use some poorly documented, barely functioning and outdated GTK bindings.

I think I lacked enough of understanding about programming to fully appreciate the language (I remember mostly contracts, as something unusual but useful).

I think I will read this book, though: if it's anything like the Eiffel one, I am sure it's very fun and didactic.

I didn't like it. It was too much theory based without enough recognition of practice. I and a very small company used it ~25 years ago. It wasn't good enough & we eventually dumped it. I can't give you reasons why as it was too long ago but I don't have a good memory of it.

I do remember of the Eiffel book that Meyer was a bit too keen on emotive arguments over factual.

"The difference between theory and practice is greater in practice than in theory."--Herb Sutter
"In theory there is no difference between theory and practice - in practice there is" (Yogi Berra)
"I really didn't say all the things I said." (Yogi Berra: https://quoteinvestigator.com/2012/12/30/yogi-didnt-say/#:~:...
Sutter's rendition (from C++ User's Journal some decades ago) has a more poetic feel, in my wildly subjective opinion.
The zeal/tunnel vision of early OOP evangelists resembles the zeal of today's FP evangelists...
(Edited the following)

I'm not talking about OOP. Meyer was hard on pre and postconditions (which were massively oversold), but these were functionally no more than assertions. He had holes in his object system. He had holes in other parts of the type system. He was not an object zealot IIRC.

I took some classes from him while he was at ETH.
Ok, post modified, but still I don't feel you've represented him entirely fairly.
It could have been interpreted badly - I was just pointing out he was from the generation that pushed OOP everywhere similarly to FP folks these days, and downplaying the problems inherent in Eiffel/OOP, similarly to FP folks that see no major issues in their own space. A single sentence can't explain the massive contribution he had on programming and Agile anyway.
Yes! At trinity college in dublin. Very interesting language with the pre and post specs.