[PEAK] What do you use 'offerAs' for?

Erik Rose psucorp at grinchcentral.com
Mon Sep 26 12:43:28 EDT 2005

I can't think of any uses that wouldn't be served just as well by  
dynamic variables. There are presently 5 uses of offerAs in my  
project: they offer connections to SQL DB's, the logged-in user, the  
HTTP request, and one other thing I'm too ashamed to mention. ;-)

So, just to make sure I'm getting this straight...

To replace the use of `offerAs=[ISQLConnection]`, you'd do something  
like this...
     with storage.iSqlConnection.push(someSqlConnectionIveGotAholdOf):
...where in the storage module it would say...
     iSqlConnection = context.Variable()

Do you propose to basically keep a global around for each interface,  
like I posit above, or do you have something whizzier in mind?

--Erik Rose

On Sep 20, 2005, at 3:24 AM, Phillip J. Eby wrote:

> But in the meantime, I am quite curious.  If you have any uses for  
> offerAs, please post about them.  I'm interested in whether there  
> are any uses that really are better than using a dynamic variable  
> for the same thing.

More information about the PEAK mailing list