This is the mail archive of the guile@sourceware.cygnus.com mailing list for the Guile project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: goops/guile doc (was Re: Simple example program to illustrate Goops)


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]