Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Why can't I pass object property by reference
Message
 
 
À
02/04/2002 00:36:38
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00639771
Message ID:
00639873
Vues:
14
Hi Steve,

I guess I wasn't clear. I meant that property cannot be passed by reference.

>Hi Sergey,
>
>Many Java classes have a .clone() method for making instance copies that can thereafter be passes in lieu of the original....
>
>**--** Steve
>
>>I don't think you can do that in any OOP language because it would breake object encapsulation. The property doesn't exists by itselff, it belongs to the object. It means you can access it only thru the object. If you could pass property by reference than you would be able to "disconnect" property from the object because you would be able to reference it directly. Can you call it a property after that?
>>
>>>Sergey,
--sb--
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform