Re: Is there any approach to define "private" vars in GOOPS?

2011-04-01 Thread Neil Jerram
nalaginrut writes: > Sorry I think the "update score" is a fake problem. It can be solved by > #:allocation #:virtual. > But I still want to talk this topic: "How to hide the critical > property?" With apologies for the late reply... I guess something like this (untested): (define valid-score

Re: Is there any approach to define "private" vars in GOOPS?

2011-03-09 Thread Andy Wingo
On Wed 09 Mar 2011 10:37, nalaginrut writes: > But I still want to talk this topic: "How to hide the critical > property?" I don't know what the GOOPS / CLOS answer is to this, but more generally, you might enjoy the following paper: http://mumble.net/~jar/pubs/secureos/ Regards, Andy --

Re: Is there any approach to define "private" vars in GOOPS?

2011-03-09 Thread Mark H Weaver
There is another approach (probably overkill) to storing private attributes of GOOPS objects, or any other Scheme object for that matter: Weak-key hash tables, documented in section 6.18.3.1 of the manual. A nice high-level interface for using them is `make-object-property'. However, it should be

Re: Is there any approach to define "private" vars in GOOPS?

2011-03-09 Thread nalaginrut
> > If you can determine at runtime whether or not any given slot access is > > allowed - perhaps based on (current-module) - it should be possible to > > enforce this by defining a new kind of slot #:allocation and putting > > that runtime check in the #:slot-ref function. > > > > Regards, > >

Re: Is there any approach to define "private" vars in GOOPS?

2011-03-09 Thread nalaginrut
> If you can determine at runtime whether or not any given slot access is > allowed - perhaps based on (current-module) - it should be possible to > enforce this by defining a new kind of slot #:allocation and putting > that runtime check in the #:slot-ref function. > > Regards, > Neil Th

Re: Is there any approach to define "private" vars in GOOPS?

2011-03-09 Thread Neil Jerram
nalaginrut writes: > hi all! > I got a question. Is there any approach to define a "private" > vars/methods in the GOOPS? Or it's impossible? I didn't find any > "private" info in the GOOPS manual. Hi there! In Guile, the visibility of identifiers - including any functions you've defined to get

Is there any approach to define "private" vars in GOOPS?

2011-03-08 Thread nalaginrut
hi all! I got a question. Is there any approach to define a "private" vars/methods in the GOOPS? Or it's impossible? I didn't find any "private" info in the GOOPS manual. -- GNU Powered it GPL Protected it GOD Blessed it HFG - NalaGinrut