Bikeshed: A consise verb for the `?` operator


I am aware that when framing ? as a monadic/applicative construct, the mechanism implementing then is bind.

What I don’t understand is how you agree that, semantically,? operates like a conjunction (“then maybe”), but still prefer a verb. The verbs, in your illustration above, are bar(), baz(), etc.

This is doubly hard to reconcile with your argument that try/? is a “happy path” construct. Conjunctions pair well with the happy path, verbs do not.

Compare:, then maybe baz, then maybe biz, then maybe buz

or, therefore baz, therefore biz, therefore buz

with your preferred nomenclature: rethrow, baz rethrow, biz rethrow, buz. propagate, baz propagate, biz propagate, buz. bubble, baz bubble, biz bubble, buz.

I agree that no single word will capture the full extent of the operation, but the above demonstration shows that a conjunction offers more clarity than a verb. The conjunction captures the conditionality of the construct, a quality unmatched by rethrow, propagate, or bubble.


I have trouble reading the example code with conjunctions like therefore on the opposite side of the call site from the operator in question (pun intended).

foo, therefore bar

The ? operator is clearly in a suffix position, which implies the above reading is in some ways “backwards”. It’s like the dollar sign, which has always been something I’ve hated.


One hundred dollars

Compare with temperatures:

21°C is 69.8°F

Twenty-one degrees Celsius is sixty-nine point eight degrees Fahrenheit

The point I’m trying to make is that dollars and degrees are neither conjunctions nor verbs. They are nouns. Guess what else is a noun? bubble


I think bubble does well on conditionality, since in a technical context it makes me think of bubble sort, where elements “bubble up” to the appropriate level, like errors do with ?.


Whoops! That’s an error on my part. I only meant to add “therefore” where the ?'s are in the original. I updated my examples. Thank you for pointing that out!

I think of it in similar terms, though instead of a bubble sort it’s events bubbling up the DOM. I certainly like it the most of the verbs mentioned, but it made me feel uneasy and I wasn’t aware of why until I read the exception paper I linked above. I think of ? as the “connective tissue” between fallible actions, much like a conjunction.


I tend not to mentally pronounce ?, but instead I read the expression it’s attached to with question intonation. So I might mentaly read try_thing(foo)? as “try_thing of foo?”, or mutex.lock()? as “mutex dot lock?” (kinda hard to express over text =P). Curious to hear if other folks do this.

Not that it helps give ? a name; personally, I when I read ? not attached to an expression I just mentally say “q”.


I also think about the DOM when I hear “bubble”. In web programming it means that an event travels up the tree. There’s nothing conditional about it. It just travels upwards. There’s only ever one parent element and it travels until it either reaches the root or the propagation is manually stopped.

Let’s focus on counter arguments. I’d like to hear some for “check”. Various people said they like it, but the only counter argument that was mentioned so far was:

  • Why does it seem generic?
  • The boolean feeling comes probably form “checkboxes” or QA checks. However, those kind of associations are exactly what we what

For “maybe” there was:

I agree with both statements.


I’d probably call it the question-mark operator because that name corresponds directly to its appearance. It would probably also be the most obvious name to search for when trying to learn Rust.

I do like the word check as the verb for this operator, as in: “verify as to correctness”, and for the general connotation of “interrupting the current motion”.

When reading Rust code the ? can also be read as the interjection “check!”, meaning “all right!”. This highlights the happy path while giving a small pause.


“check” is the best name for the concept I’ve heard yet, whereas, “question mark operator” is the best name I’ve heard for naming the operator itself. I nominate:

  • Concept: Check
  • Name of Operator: Question Mark Operator

Sounds good to me.


What about the “gate” operator? The concept of having a gate/door that you can pass or be rejected from seems appropriate. As if ? was a bouncer at the door for the “happy path”. Maybe “bouncer” operator could work as well.

EDIT: Also sounds like a purgatory where the distinction between good and bad is made :stuck_out_tongue:

Purge: In history, religion and political science, a purge is a removal of people who are considered undesirable by those in power from a government, another organization, their team owners, or society as a whole.


This reminds me of the 2nd definition of limbo:

an uncertain period of awaiting a decision or resolution; an intermediate state or condition.

Though, when I think of a “limbo operator”, I think of the competitive kind.