realbasic-nug
[Top] [All Lists]

Re: Interfaces and Computed Properties

To: REALbasic NUG <realbasic-nug@lists.realsoftware.com>
Subject: Re: Interfaces and Computed Properties
From: Norman Palardy <npalardy@great-white-software.com>
Date: Wed, 26 Nov 2008 17:59:22 -0700
Authentication-results: mx.google.com; spf=neutral (google.com: 74.124.194.228 is neither permitted nor denied by best guess record for domain of realbasic-nug-bounces@lists.realsoftware.com) smtp.mail=realbasic-nug-bounces@lists.realsoftware.com
Delivered-to: listarchive@realsoftware.com
In-reply-to: <33cbfa100811261628h68d4a3c2xd11a3ca8d3c9881e@mail.gmail.com>
References: <4F4D1ADF-52CE-4EBA-9346-9BE37992CCDD@xochi.com> <1ED2BB86-1E43-4A4C-8245-F8D587E28BC2@great-white-software.com> <BFB05065-1FC3-4400-A27F-1448615FFD11@xochi.com> <33cbfa100811261510l7803122fu2592dd1d7f03848b@mail.gmail.com> <421C4E27-0784-4D03-B28D-EB52A783BADE@great-white-software.com> <33cbfa100811261628h68d4a3c2xd11a3ca8d3c9881e@mail.gmail.com>
Reply-to: REALbasic NUG <realbasic-nug@lists.realsoftware.com>
Sender: realbasic-nug-bounces@lists.realsoftware.com

On 26-Nov-08, at 5:28 PM, Lars Jensen wrote:

ie/ you have no clue if

   myclass.someProperty = 6

is implemented as
 a naked public property
a getter setter pair with a setter like someProperty(assigns i as integer)
 a computed property with a setter

Right. My point is that Class Interfaces require you to have a clue,
and this can be considered a weakness by fans of information hiding.
They specify not just an API but a specific set of method signatures.

it does only because you cannot provide the implementation of the getter / setter method pair by a public property or computed property

if you could then the interface would be fine and the implementation would be 100% up to the implementing class

but that's not possible

and the contract would be simply behavior and not a mish mash of behavior and data


pure abstract classes are "interfaces" in C++ .. and you dont put properties in them either :)

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>


<Prev in Thread] Current Thread [Next in Thread>