Brdsnest Lemmy
  • Communities
  • Create Post
  • Create Community
  • heart
    Support Lemmy
  • search
    Search
  • Login
  • Sign Up
Cipherd@lemmy.ml to Programmer Humor@lemmy.ml · 17 hours ago

functions

lemmy.ml

message-square
17
fedilink
  • cross-posted to:
  • programmer_humor@programming.dev
182

functions

lemmy.ml

Cipherd@lemmy.ml to Programmer Humor@lemmy.ml · 17 hours ago
message-square
17
fedilink
  • cross-posted to:
  • programmer_humor@programming.dev
alert-triangle
You must log in or register to comment.
  • Ephera@lemmy.ml
    link
    fedilink
    English
    arrow-up
    4
    ·
    4 hours ago

    Bash fucks me up so much, too. You just put the parentheses there to say that something is a function, not for actually declaring the parameters that can be passed in…

  • KSP Atlas@sopuli.xyz
    link
    fedilink
    arrow-up
    7
    ·
    11 hours ago

    Haskell: =

  • potatoguy@lemmy.eco.br
    link
    fedilink
    arrow-up
    35
    arrow-down
    1
    ·
    16 hours ago

    And the best:

    public static void () {}

    spoiler

    /s

    • Baizey@feddit.dk
      link
      fedilink
      arrow-up
      2
      ·
      13 hours ago

      Technically java would also be (){} since the modifiers are optional (outside of public static void main(String… args)) and return type is ignore for the others :D

      • potatoguy@lemmy.eco.br
        link
        fedilink
        arrow-up
        5
        ·
        13 hours ago

        Yeah, it’s a joke, but I disagree on the void, the other languages on the meme doesn’t need a return type (when they are returning nothing), java needs it.

  • Ŝan • 𐑖ƨɤ@piefed.zip
    link
    fedilink
    English
    arrow-up
    22
    ·
    16 hours ago

    :(){:|: &};:

    • bleistift2@sopuli.xyz
      link
      fedilink
      English
      arrow-up
      8
      ·
      16 hours ago
      :(){:|: &};:
      :(){:|: &};:
      
      • HumanPerson@sh.itjust.works
        link
        fedilink
        English
        arrow-up
        7
        ·
        edit-2
        13 hours ago
        :(){:|: &};:
        :(){:|: &};:
        :(){:|: &};:
        :(){:|: &};:
        
        • cryoistalline@lemmy.ml
          link
          fedilink
          arrow-up
          5
          ·
          13 hours ago
          :(){:|: &};:
          :(){:|: &};:
          :(){:|: &};:
          :(){:|: &};:
          :(){:|: &};:
          :(){:|: &};:
          :(){:|: &};:
          :(){:|: &};:
          
  • Prunebutt@slrpnk.net
    link
    fedilink
    arrow-up
    3
    ·
    12 hours ago

    Nix:

    x:;

  • bleistift2@sopuli.xyz
    link
    fedilink
    arrow-up
    9
    ·
    16 hours ago
    function() {}
    
    • davel [he/him]@lemmy.ml
      link
      fedilink
      English
      arrow-up
      8
      arrow-down
      1
      ·
      16 hours ago

      JavaScript can do better than that:

      () => {}
      
      • Oriel Jutty :hhHHHAAAH:@infosec.exchange
        link
        fedilink
        arrow-up
        4
        ·
        16 hours ago

        C++: [](){}

        • davel [he/him]@lemmy.ml
          link
          fedilink
          English
          arrow-up
          3
          ·
          edit-2
          15 hours ago

          Huh, I haven’t looked at C++ in decades, and I didn’t know they’d added lambda functions/expressions, in C++11. Apparently you can shorten it further: []{}

      • bleistift2@sopuli.xyz
        link
        fedilink
        English
        arrow-up
        2
        ·
        16 hours ago

        The intention was to provide a longer version for the first step of the ladder.

  • davel [he/him]@lemmy.ml
    link
    fedilink
    English
    arrow-up
    6
    ·
    16 hours ago

    Some Lisp dialects: (λ () )

  • bort@sopuli.xyz
    link
    fedilink
    arrow-up
    1
    ·
    12 hours ago

    kotlin also has ()->{} and {} (when there is just 1 parameter)

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: !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.
Visibility: Public
globe

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

  • 231 users / day
  • 1.11K users / week
  • 2.73K users / month
  • 7.93K users / 6 months
  • 1 local subscriber
  • 39.2K subscribers
  • 2K Posts
  • 41.4K Comments
  • Modlog
  • mods:
  • AgreeableLandscape@lemmy.ml
  • cat_programmer@lemmy.ml
  • BE: 0.19.5
  • Modlog
  • Instances
  • Docs
  • Code
  • join-lemmy.org