Lemmy
  • 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
25
fedilink
182

The ???? operator

programming.dev

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

I found this funny.

The context is as explained by @[email protected]

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 @[email protected]

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: [email protected]

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

Wormhole

[email protected]

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.

  • 3 users / day
  • 57 users / week
  • 390 users / month
  • 2.88K users / 6 months
  • 1 local subscriber
  • 7.14K subscribers
  • 1K Posts
  • 4.48K Comments
  • Modlog
  • mods:
  • snowe@programming.dev
  • Ategon@programming.dev
  • EdTheLegendary@programming.dev
  • kahnclusions@programming.dev
  • torcherist@programming.dev
  • BE: 0.19.9
  • Modlog
  • Instances
  • Docs
  • Code
  • join-lemmy.org