_self
Get a Link to this Thing --
Function
thing._self simply produces thing.
This seems silly, but it is useful for overriding the usual _apply behavior. In particular,
property._self is the way to get a link to the property itself, instead of fetching the value
of the property on the received Thing. This is the only common use case for _self!
More formally, _self is the way to override the usual [[_apply]] behaviour on a Thing, to get a
Link to that Thing. It is never necessary for ordinary Things, but frequently useful when _apply
has been defined on it.
_self can only be used in a dotted expression -- there must always be something before the dot, and
that something is what gets produced.
If you think you want _self for anything other than on a Property, odds are you are looking for
something else. If you're trying to fetch "everything that points to this" (one of the more common
cases), check out
_refs, which does exactly this. Or, if you are in a QL expression and are
looking for a way to say "this Thing that I'm looking at here", you can usually get that as
$_context
. (Which is technically "the value passed into this QL expression at the beginning".)