ColonEquals

The three clauses of the :=/2 operator, the entry point of :oop-lib's fluent syntax: it dispatches, based on whether its first argument is unbound and its second a cast expression, to either invoking a (possibly chained) method/constructor call (Invocation, Cast) or assigning a property (Assignment).

':='(R, X as T) :- var(R), !, fluent_reduce(X, Y), cast(Y, T, R).
':='(R, M) :- var(R), !, fluent_reduce(M, R).
':='(C, V) :- property_reduce(C, R, P), assign(R, P, V).

For instance, R := X.foo(1) as 'java.lang.Long' first fluently reduces X.foo(1) and then casts the outcome to Long before binding R (Cast); R := X.foo(1).bar fluently chains two invocations into R (Invocation); and X.name := joe reduces X.name to a (Ref, Property) pair and assigns joe to it (Assignment).

See also

Inheritors

Types

Link copied to clipboard
Link copied to clipboard
object Cast : ColonEquals
Link copied to clipboard

Properties

Link copied to clipboard
open val Scope.body: Term
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open val Scope.head: List<Term>
Link copied to clipboard
override val implementation: Rule
Link copied to clipboard

Functions

Link copied to clipboard
override fun toString(): String