mcc,
@mcc@mastodon.social avatar

Question for Rust programmers:

When you see this sequence of characters in a Rust program:

|_|

Never mind whether you would ever say it out loud— in your head, what do you think of the name of this sequence of symbols being? Do you have a name for it at all?

I have an answer but I am curious about yours.

aeva, (edited )
@aeva@mastodon.gamedev.place avatar

@mcc I have no idea what that is, but the most adjacent thing in my mind is the .. kaomoji, so I guess it's like i_i but the eyes are closed. I imagine T_T is a legal variable name in Rust, so || is probably the next most reasonable ascii sequence to use for some kind of special quiet desperation operator? Am I close?

Catawu,
@Catawu@mastodon.social avatar

@mcc GOAL!

porglezomp,
@porglezomp@mastodon.social avatar

@mcc I can say that |_| () is the toilet operator and I think of it that way

snowkitty,
@snowkitty@mastodon.social avatar

@mcc "blank to.." and then whatever comes after it

mdsherry,
@mdsherry@mastodon.social avatar

@mcc I've heard of the longer sequence |_|() referred to as a toilet for its shape and, I assume, the way it flushes away values

hisham_hm,
@hisham_hm@mastodon.social avatar

@mcc I just think "closure", and I don't have any particular name related to the fact that the discarded argument makes it look cute

floooh,
@floooh@mastodon.gamedev.place avatar

@mcc 'discard' or 'ignore'

floooh,
@floooh@mastodon.gamedev.place avatar

@mcc disclaimer: I'm not actually a Rust programmer, at best an occasional tinkerer

whitequark,
@whitequark@mastodon.social avatar

@mcc i do not need to think of it in words so i just think of it as the ... AST or whatever

  • All
  • Subscribed
  • Moderated
  • Favorites
  • random
  • ngwrru68w68
  • DreamBathrooms
  • modclub
  • GTA5RPClips
  • InstantRegret
  • magazineikmin
  • Youngstown
  • thenastyranch
  • rosin
  • slotface
  • mdbf
  • khanakhh
  • kavyap
  • anitta
  • tester
  • normalnudes
  • Leos
  • cisconetworking
  • osvaldo12
  • everett
  • Durango
  • tacticalgear
  • provamag3
  • megavids
  • ethstaker
  • cubers
  • JUstTest
  • lostlight
  • All magazines