Hacker News new | ask | show | jobs
by nemo1618 1891 days ago
I don't know much about Eiffel; do you know of any articles or talks that discuss its design tradeoffs?
1 comments

Eiffel's bigger contributions are probably:

Design-by-contract. The contracts aren't just comments, they aren't haphazardly enforced by adding asserts to the code. They're explicit parts of the language which allows for a lot of interesting consequences when utilized. Testing can be semi-automated directly from the code, some elements of the program design can be proved to be satisfied statically without the need for compilation and execution. The ability to encode your specification into the language is incredibly useful.

Command-query separation. If methods return a value (queries) they should be referentially transparent, having no side effects. This is a principle so not an explicit language feature, but it can be enforced using DbC.