[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

equivalent of "this" in goops?

From: Greg Troxel
Subject: equivalent of "this" in goops?
Date: 16 Feb 2005 16:35:50 -0500
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3

I'm using guile 1.6.x,and doing network mapping.

In a class representing a node, I want to have a slot with an
init-thunk, and I would like to call a procedure with the class object
as an argument.  The slot holds a class object which is basically a
hash table of links in a network, and it needs the node object so it
can hash on 'other end node id'.

So, I'd like to pass 'this' in c++ terms, and I don't see how to do
that from reading  I realize there are issues with the
class not being fully initialized, and in my case that's safe since
I'm just storing the object in a variable and not using it until a
link is added, which doesn't happen during object initialization.
Thus I realize that what I want to do is vaguely unschemely.

My fallback is to initialize the linkset on first use, or after object
createion, or something like that.

        Greg Troxel <address@hidden>

reply via email to

[Prev in Thread] Current Thread [Next in Thread]