Lemmy Today
  • Communities
  • Create Post
  • Create Community
  • heart
    Support Lemmy
  • search
    Search
  • Login
  • Sign Up
snaggen@programming.dev to Rust@programming.devEnglish ·
edit-2
2 years ago

The ???? operator

programming.dev

message-square
26
link
fedilink
188

The ???? operator

programming.dev

snaggen@programming.dev to Rust@programming.devEnglish ·
edit-2
2 years ago
message-square
26
link
fedilink

I found this funny.

The context is as explained by @laund@hachyderm.io

the issue is that you can’t return from inside a closure, since the closure might be called later/elsewhere

and this post was the asnwer to the question by @antonok@fosstodon.org

you got me curious what the record for the longest ? operator chain on crates.io is

Original post: https://fosstodon.org/users/antonok/statuses/111134824451525448

  • sip@programming.dev
    link
    fedilink
    arrow-up
    12
    ·
    edit-2
    2 years ago

    there was a comment about adding an ?! operator that would resolve any number of ? operators but I can’t find it.

    • MonkCanatella@sh.itjust.works
      link
      fedilink
      arrow-up
      20
      ·
      2 years ago

      ‽

      • sugar_in_your_tea@sh.itjust.works
        link
        fedilink
        arrow-up
        3
        ·
        2 years ago

        Interrobang gang rise up!

    • Aloso@programming.dev
      link
      fedilink
      arrow-up
      2
      ·
      2 years ago

      I can’t remember ever needing more than two question marks (??), and even that is very rare in my experience.

Rust@programming.dev

rust@programming.dev

Subscribe from Remote Instance

Create a post
You are not logged in. However you can subscribe from another Fediverse account, for example Lemmy or Mastodon. To do this, paste the following into the search field of your instance: !rust@programming.dev

Welcome to the Rust community! This is a place to discuss about the Rust programming language.

Wormhole

!performance@programming.dev

Credits
  • The icon is a modified version of the official rust logo (changing the colors to a gradient and black background)
Visibility: Public
globe

This community can be federated to other instances and be posted/commented in by their users.

  • 37 users / day
  • 176 users / week
  • 393 users / month
  • 2.86K users / 6 months
  • 23 local subscribers
  • 6.92K subscribers
  • 959 Posts
  • 4.6K Comments
  • Modlog
  • mods:
  • snowe@programming.dev
  • Ategon@programming.dev
  • EdTheLegendary@programming.dev
  • kahnclusions@programming.dev
  • torcherist@programming.dev
  • BE: 0.19.11
  • Modlog
  • Legal
  • Instances
  • Docs
  • Code
  • join-lemmy.org