Object E

The object known as "E" in the safeEnv is the primitive with which variable-argument calls and sends may be made, and also provides shortcuts for converting objects to strings.

(Note: Caja-CapTP, which borrows E's reference/call/send system, conflates this object with Ref.)

Note that even though send expressions are defined in terms of the E object, it does not solely constitute the authority to eventual send; Miranda __whenMoreResolved means every object provides this authority.

Protocol
An E immediate call -- ask 'rec' to immediately do the request described by verb using the supplied args.

See The Immediate Call.

Defined in order to be more efficient when forwarding matcher messages than E.call.

The E implementation is not required to use a guard on message as strict as shown, though the guards for E.call's arguments must of course be applied.

Queue the described delivery.

Rather than providing an explicit Resolver as input argument, this method returns a promise that represents the outcome. When the actual outcome is determined, the returned reference will reflect that outcome.

This should only synchronously throw an exception if invoked while there's no current Vat.

See The Pipelined Send.

Like sendAll(rec, verb, args), except that "Only" means we don't care about the result (including whether it succeeded), as is appropriate for event notifications.

Return value: Why wasn't this event queued? It isn't queued if this vat or comm connection is shut down, in which case the returned problem explains why. If null is returned, then the event was queued, though it may still not arrive.

See The Eventual Send: sendOnly.

Prints obj, and returns this printed form.

E programmers should generally call "E.toString(obj)", rather than "obj.toString". This applies both to E language programmers and to ELib programmers. However, E programmers should not generally call E.toString(obj) from within __printOn(TextWriter) methods, as that will circumvent the cycle-breaking logic in TextWriter. Instead, you should usually call a TextWriter.*print*(obj) method, as it will check for a cycle before calling __printOn(TextWriter) on its argument.

Like toString, but gets the quoted form.