This is the mail archive of the
guile@sourceware.cygnus.com
mailing list for the Guile project.
Re: goops/guile doc (was Re: Simple example program to illustrate Goops)
- To: guile at sourceware dot cygnus dot com
- Subject: Re: goops/guile doc (was Re: Simple example program to illustrate Goops)
- From: Lalo Martins <lalo at webcom dot com>
- Date: Thu, 3 Feb 2000 00:48:59 -0200
- References: <20000127120716.29627.qmail@web1805.mail.yahoo.com> <200001280904.JAA00754@ossau> <38918B07.F7DDA4A7@enteract.com> <m3ln5a9jyu.fsf@behemoth.dethfart.org> <20000128221212.B10630@webcom.com> <m3zotous2j.fsf@behemoth.dethfart.org> <20000130021949.B28876@webcom.com> <m3u2jrayg4.fsf@behemoth.dethfart.org>
On Wed, Feb 02, 2000 at 09:34:27PM -0330, Greg Harvey wrote:
>
> In this case, it might be best to go to something less schemely like
>
> (private <int> car)
Yes, of course, makes sense and is easy to implement.
> and implement it with a private macro that munges the name into
> something not car, so that you end up with a pseudo-private variable
> for someone who's really into encapsulation (as I recall, this is how
> python does it).
I don't think it's a good idea. This would require even uglier
munging on later code to fix references to the ``private''
member.
For slots, private can be implemented using a (rather ugly)
combination of accessors, I think. Implementing it for methods
is a more complex question.
And of course ``protected'' is completely out of question,
AFAICS :-)
> The actual syntax of the declarations could be
> something like:
>
> (<munger>* type name [<arguments> <body])
>
> Where munger would be stuff like private, static, etc...
I don't think it's desirable to allow more than one munger. Let
it be a ``member classification''; either it is a, or b, or c.
Stacking these types would be a painful lot of work.
[]s,
|alo
+----
--
I am Lalo of deB-org. You will be freed.
Resistance is futile.
http://www.webcom.com/lalo mailto:lalo@webcom.com
pgp key in the web page
Debian GNU/Linux --- http://www.debian.org
Brazil of Darkness -- http://zope.gf.com.br/BroDar