in reply to Re^3: kind of effort required for learning OO perl ?!
in thread kind of effort required for learning OO perl ?!

Though be aware that Eiffel not only is OO, it's also "design by contract". There's a strong focus on checking pre- and postconditions and invariants.

There's nothing wrong with "design by contract", but it might bog you down if you're looking at Eiffel just to get more knowledgeable about OO.

To explain in a few lines and with lots of handwaving: each class has a set of invariants defined. Each time you call a method in an object of said class, the invariants are checked upon method exit. Exception on failure. Loop invariants and postconditions are checked in a similar way.

  • Comment on Re^4: kind of effort required for learning OO perl ?!

Replies are listed 'Best First'.
Re^5: kind of effort required for learning OO perl ?!
by BrowserUk (Patriarch) on Jul 30, 2010 at 08:45 UTC
    There's nothing wrong with "design by contract", but it might bog you down if you're looking at Eiffel just to get more knowledgeable about OO.

    Personally, I found that the DbC aspect of Eiffel considerably simplified the process of creating classes. Though I admit I was not an OO beginner when I came to Eiffel.

    The reasons are that

    • It moves most if not all of the error checking out-of-line of the main method code.

      That means that you can concentrate upon the actual algorithms within the methods, and avoid the clutter of in-line error handling.

    • It makes it very easy to specify quite liberal constraints at the outset and then gradually increase these as you more clearly understand what they should (or need) to be.

    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    "Science is about questioning the status quo. Questioning authority".
    In the absence of evidence, opinion is indistinguishable from prejudice.