Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re^4: A proper name for is_sorted function that can check more than just sorting order?

by Anonymous Monk
on Dec 26, 2017 at 20:26 UTC ( [id://1206242]=note: print w/replies, xml ) Need Help??


in reply to Re^3: A proper name for is_sorted function that can check more than just sorting order?
in thread A proper name for is_sorted function that can check more than just sorting order?

Why not OO framework then? Getters/setters, methods all in one place with internal logic and consistency checks as required. What problem is this that cannot be abstracted and subdivided into parts?

  • Comment on Re^4: A proper name for is_sorted function that can check more than just sorting order?

Replies are listed 'Best First'.
Re^5: A proper name for is_sorted function that can check more than just sorting order?
by Dallaylaen (Chaplain) on Dec 28, 2017 at 10:32 UTC

    Object-orientation and type checking protect from certain type of errors, but they don't impose specific behavior on class methods.

    Runtime assertions and to a lesser extent unit-tests guard invariants.

    Unit-tests ensure (or, rather, try hard to disprove) the fact that in certain predictable cases the software behaves exactly as predicted.

    There are also design-by-contract frameworks (like Class::Contract) that do all of the above, however at a performance cost, plus it's a bit of take it or leave it. One cannot say "ok, we had a bug yesterday, so I'm adding a contract wrapper to this sub so we can avoid it in the future".

    All different, each serves its own purpose...

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1206242]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others rifling through the Monastery: (5)
As of 2024-04-19 07:30 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found