ubergeek77's Lemmy
  • Communities
  • Create Post
  • Create Community
  • heart
    Support Lemmy
  • search
    Search
  • Login
  • Sign Up
Sleepzy@feddit.it to Programmer Humor@lemmy.ml · 2 years ago

Elvis

feddit.it

external-link
message-square
32
link
fedilink
145
external-link

Elvis

feddit.it

Sleepzy@feddit.it to Programmer Humor@lemmy.ml · 2 years ago
message-square
32
link
fedilink
  • dev_null@lemmy.ml
    link
    fedilink
    arrow-up
    4
    ·
    2 years ago

    It’s a shorthand for writing this:

    variable = if (input != null) input else default
    

    This is equivalent:

    variable = input ?: default
    
    • AVincentInSpace@pawb.socialBanned from community
      link
      fedilink
      English
      arrow-up
      2
      ·
      2 years ago

      Huh. Neat feature.

      • dev_null@lemmy.ml
        link
        fedilink
        arrow-up
        2
        ·
        2 years ago

        It’s in Kotlin and some other languages. C# has it but there it’s actually A ?? B.

Programmer Humor@lemmy.ml

programmerhumor@lemmy.ml

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]

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

  • Posts must be relevant to programming, programmers, or computer science.
  • No NSFW content.
  • Jokes must be in good taste. No hate speech, bigotry, etc.
Visibility: Public
globe

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

  • 11 users / day
  • 406 users / week
  • 1.58K users / month
  • 5.18K users / 6 months
  • 1 local subscriber
  • 42.3K subscribers
  • 2.01K Posts
  • 40.2K Comments
  • Modlog
  • mods:
  • AgreeableLandscape@lemmy.ml
  • cat_programmer@lemmy.ml
  • BE: 0.19.16
  • Modlog
  • Instances
  • Docs
  • Code
  • join-lemmy.org