Re: [RFC] Property Accessors v1.2 : Internal Accessor Method Visibility / Callability

From: Date: Wed, 31 Oct 2012 19:46:32 +0000
Subject: Re: [RFC] Property Accessors v1.2 : Internal Accessor Method Visibility / Callability
References: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18  Groups: php.internals 
Request: Send a blank email to internals+get-63731@lists.php.net to get a copy of this message
Hi! > Well, LSP is typically not applied to program semantics, since this is > not a generally decidable problem. The only post-conditions that LSP > normally enforces is type based, i.e. the covariance of the return > type. Err, I'm not sure where you are taking this from, but LSP is certainly not limited to return types. See: https://en.wikipedia.org/wiki/Liskov_substitution_principle If you look at classic Square/Rectangle example, it's all about semantics and has nothing to do with types. > Instead, LSP simply states that, given B <: A, all objects of A can be > substituted by objects of B while preserving the validity of the > method calls on these objects, and the validity of their return > values. This is guaranteed here: I would suggest at that point reading actual description of the LSP. You rendition of it is wrong. -- Stanislav Malyshev, Software Architect SugarCRM: http://www.sugarcrm.com/ (408)454-6900 ext. 227

« previous php.internals (#63731) next »