on master help sign in
document %slip in arvo.md (#835)

* explains what slips are * slips smell

commit7093c75f6c2d3cbed4bb7b3c7747d517441ff55c authorpoprox <51337059+syzygyzer@users.noreply.github.com> dateTue 21 Apr 2020, 15:28 (7 years ago) parentca8c1e7
1 file changed+13−1
tutorials/arvo/arvo.md+13−1
tutorials/arvo/arvo.md+13−1
@@ -346,7 +346,7 @@ representing a cause.
346346
347347If `duct`s are a call stack, then how do we make calls and produce results? Arvo
348348processes `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`.
350350
351351A `%pass` `move` is analogous to a call:
352352
@@ -365,6 +365,18 @@ A `%give` `move` is analogous to a return:
365365
366366Arvo pops the top `wire` off the `duct` and sends the given `card` back to the caller.
367367
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+
368380Lastly, a `%unix` `move` is how Arvo represents communication from Unix, such as a
369381network request or terminal input.
370382