Open jbee opened 12 years ago
One possibility is to create a special Functor
for that purpose. The original invoked functor will pass itself as an argument to this special functor. Thereby he can tell a lot about it. But one important case is missing: it cannot tell about the internal data/value of the argument functor. That's up to each functor.
There should be a special character indicating the invocation of pseudo values. It shouldn't be used in any other context or case. Because of that the possible characters are very restricted. Candidates: ^
, >
, $
, ...?
In addition to selectors that can tell something about the current Functor
associated with a Var
or expression there should be support for selectors reading the execution state, the functor-stack (the evolution of the functors during invoking a Selector
expression on a origin Functor
.
Lets assume ^
is our pseudo functor indicator. Some ideas:
foobar^type = Integer(Functor) // the simple name of the functor class (maybe suppressing the word Functor)
foobar^stack = [Integer, String, Nothing] // stack is a list or object functor of stack frames
How to support a couple of pseudo-selectors that are available for each
Functor
that doesn't have a connection to the value theFunctor
represents (like getting information upon theFunctor
itself - e.g. its class or so).