on master help sign in
document %slip in arvo.md (#835)
7093c75poprox
tutorials/arvo/arvo.md+13−1
@@ -346,7 +346,7 @@ representing a cause.
346
346
347If `duct`s are a call stack, then how do we make calls and produce results? Arvo
347If `duct`s are a call stack, then how do we make calls and produce results? Arvo
348processes `move`s which are a combination of message data and metadata. There
348processes `move`s which are a combination of message data and metadata. There
349−are three types of `move`s: `%pass`, `%give`, and `%unix`.
349+are four types of `move`s: `%pass`, `%give`, `%slip`, and `%unix`.
350
350
351A `%pass` `move` is analogous to a call:
351A `%pass` `move` is analogous to a call:
352
352
@@ -365,6 +365,18 @@ A `%give` `move` is analogous to a return:
365
365
366Arvo pops the top `wire` off the `duct` and sends the given `card` back to the caller.
366Arvo pops the top `wire` off the `duct` and sends the given `card` back to the caller.
367
367
368+A `%slip` `move` is a cousin of `%pass`. Any `card` that can be `%pass`ed can also be
369+`%slip`ed, but while a `%pass` says to "push this `wire` onto the `duct` and
370+transfer control to the receiving vane", a `%slip` transfers control to the
371+receiving vane without altering the `duct`. Therefore, a `%give` in response to
372+a `%slip` will go to the caller of the vane that sent the `%slip` rather than
373+the vane that actually sent the `%slip`. `%slip`s are much more rare than
374+`%pass`es and `%give`s. In general, `%slip` and `%pass` `move`s are
375+both referred to as "passes" and it should be clear from the context if one
376+means to refer only to `%pass`es and not `%slip`s or vice versa. Lastly, we note
377+that `%slip` is a code smell and should nearly always be avoided. It can result
378+in unexpected behavior like receiving a gift from a vane you never passed a note to.
379+
368Lastly, a `%unix` `move` is how Arvo represents communication from Unix, such as a
380Lastly, a `%unix` `move` is how Arvo represents communication from Unix, such as a
369network request or terminal input.
381network request or terminal input.
370
382