The Enchanted Tavern
  • Communities
  • Create Post
  • heart
    Support Lemmy
  • search
    Search
  • Login
  • Sign Up
@Sleepzy@feddit.it to Programmer Humor@lemmy.ml • 6 months ago

Elvis

feddit.it

message-square
42
fedilink
152

Elvis

feddit.it

@Sleepzy@feddit.it to Programmer Humor@lemmy.ml • 6 months ago
message-square
42
fedilink
alert-triangle
You must log in or register to comment.
  • @dev_null@lemmy.ml
    link
    fedilink
    4•6 months ago

    It’s a shorthand for writing this:

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

    This is equivalent:

    variable = input ?: default
    
    • @AVincentInSpace@pawb.social
      link
      fedilink
      English
      2•
      edit-2
      6 months ago

      Huh. Neat feature. That’s in C# I assume?

      • @dev_null@lemmy.ml
        link
        fedilink
        2•
        edit-2
        6 months 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
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: !programmerhumor@lemmy.ml

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.
  • 3 users / day
  • 84 users / week
  • 176 users / month
  • 1.56K users / 6 months
  • 1 subscriber
  • 1.59K Posts
  • 29.7K Comments
  • Modlog
  • mods:
  • @AgreeableLandscape@lemmy.ml
  • @cat_programmer@lemmy.ml
  • UI: unknown version
  • BE: 0.18.2
  • Modlog
  • Instances
  • Docs
  • Code
  • join-lemmy.org