Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Set and Get appl obj property good practice
Message
From
01/08/2009 15:14:38
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
 
To
01/08/2009 13:43:38
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 9 SP1
Miscellaneous
Thread ID:
01415630
Message ID:
01415768
Views:
48
>This argument has IMHO more weight when used for an interface exposing only very small part of the class - and even then, if type changes in the base field for instance, changes in the external code can be necessary. But most internal class code also uses the get/set-methods, as they are (today mostly automatically genereated) in the code anyhow, so why not use the isolation for internal use ?
>
>Yes, I also think "overriding" normal property handling is more elegant and programming only the needed exceptions or functions from "normal" behaviour has better OOP taste ;-) But AFAIR at least some java devs strive for less boilerplate code as well: aspect-orientation can be used in a similar way. But IMHO this is still uglier than the vfp way.

I will reply specifically to the last sentence... I agree. Allowing access and assign methods makes the original programming much simpler, and yet allows to hide internal workings of the class later on. (Disclaimer - Still not an expert on Java... There may be a better way I am not aware of.)
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform