swarm-support
[Top][All Lists]
Advanced

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

Suggested improvement to gcc


From: Sven N. Thommesen
Subject: Suggested improvement to gcc
Date: Fri, 23 Jan 1998 14:20:23 -0600

Well,

I know this isn't the list, but I thought if y'all (especially the gurus at
SFI) find it sensible, perhaps you could forward the suggestion to the
relevant gcc maintainers.

Currently, you have automagically available to any object the identifiers
'self' and 'super' as possible targets for messages. I'd like to propose an
additional one, namely 'caller', which would be the id of the object that
invoked the method that's currently executing.

The intended use is this: say one agent sends a message to another agent
that initiates a trade, or a discussion, or whatever. Then agent 2 might
wish to know more about agent 1 before deciding how to reply, hence the
need for a message like 'answer = [caller tellMeWhatTribeYouBelongTo]'.

It is of course possible to have callers pass 'self' as a formal argument,
but in models where this need comes up that could be a bother. Making
'caller' available cannot add much to the language, since the info is
already available to the compiler and/or runtime system.

So, two questions:

a) does anyone feel this would be a useful addition?

b) how would the objC runtime system handle a sequence of calls back and
forth between two agents? Any problems there?

--Sven


                  ==================================
   Swarm-Support is for discussion of the technical details of the day
   to day usage of Swarm.  For list administration needs (esp.
   [un]subscribing), please send a message to <address@hidden>
   with "help" in the body of the message.
                  ==================================


reply via email to

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