Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!news-1.dfn.de!news.dfn.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: "Urs Eggmann" Newsgroups: comp.lang.clipper.visual-objects Subject: Re: Export vs Protect and Access Date: Mon, 26 May 2014 22:36:36 +0200 Lines: 35 Message-ID: References: <19d01048-056a-41f7-93f6-c11362766a35@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=original Content-Transfer-Encoding: 7bit X-Trace: individual.net 4Ca5ml8kHHRsxVbHHz1vLgGiB4JRMH3G2GB7cDEo9RRLzmVTB4 Cancel-Lock: sha1:nGx75Sq7cbnLAWd+a41ziSX3zJg= X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.5931 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157 Xref: csiph.com comp.lang.clipper.visual-objects:6913 Hi Chris, As Marc wrote, with EXPORT you violate (at least a little) the principle of class encapsulation. With properly programmed access and assign methods you have a defined interface to the class variables and the possibility to do some checking of transferred values. I prefer Marcs method with the underscore. regards Urs "CMc" schrieb im Newsbeitrag news:19d01048-056a-41f7-93f6-c11362766a35@googlegroups.com... > Finally making the move from 2.7b to 2.8 and am getting a lot of > "Access/Assign method has same name as Protected ivar" compiler errors > that I need to clean up. Can someone tell me what's the difference > between: > > CLASS MyClass > EXPORT cVar AS STRING > > and > > CLASS MyClass > PROTECT _cVar AS STRING > > ACCESS cVar CLASS MyClass > RETURN SELF:_cVar > > Is one more efficient, better for memory management, easier to port to > Vulcan? Other than coding style, why should I use one over the other? > > Thanks, > Chris