in reply to Re^20: Assignable Subroutines
in thread Assignable Subroutines

You appear to be suffering from tunnel vision that all valadation is based on data type. Validation based on data type is fine, and when I want that I'll likely have an object that encapsulates more than just validation and so my classes that use that type won't need to do validation so providing a hook for the containing object isn't particularly attractive to me.

The point of validation in an object's "set" method is to validate the request against the state of the object and even cause the setting to impact the state of the object outside of just that particular member variable.

- tye        

  • Comment on Re^21: Assignable Subroutines (tunnel of fudge)

Replies are listed 'Best First'.
Re^22: Assignable Subroutines (tunnel of fudge)
by Aristotle (Chancellor) on Jan 27, 2005 at 19:14 UTC

    Indeed, I have tunnel vision here. After all, I was trying to show BrowserUk that type based validation is useful for cases where I want to validate the type of a value… while his vehemently argued position is that type based validation is a nightmare/useless/something like that.

    In any case, thank you for a break in that circle. Yes, of course, state based validation is a different beast.

    Makeshifts last the longest.