Lemmy
  • Communities
  • Create Post
  • heart
    Support Lemmy
  • search
    Search
  • Login
  • Sign Up
ZILtoid1991@lemmy.world to Programmer Humor@programming.dev · 3 days ago

Accidental shitpost

lemmy.world

message-square
18
link
fedilink
143

Accidental shitpost

lemmy.world

ZILtoid1991@lemmy.world to Programmer Humor@programming.dev · 3 days ago
message-square
18
link
fedilink
alert-triangle
You must log in or # to comment.
  • ImgurRefugee114@reddthat.com
    link
    fedilink
    arrow-up
    85
    ·
    3 days ago

    The joke is even funnier on my client

    • ChaoticNeutralCzech@feddit.org
      link
      fedilink
      English
      arrow-up
      15
      ·
      2 days ago

      Yes, it blends in with Voyager’s UI because it’s a screenshot of Voyager’s UI.

  • bleistift2@sopuli.xyz
    link
    fedilink
    English
    arrow-up
    10
    ·
    2 days ago

    Is there ever an instance when you do want to compare object identity instead of “equal”-ness? I find this behaviour just confusing for beginners and not useful for experts.

    • anton@lemmy.blahaj.zone
      link
      fedilink
      arrow-up
      1
      ·
      12 hours ago

      Is there ever an instance when you do want to compare object identity instead of “equal”-ness?

      Maybe if you have to check if the object is one you already hold a lock for or account for some similar consequence of questionable architecture.

    • Redkey@programming.dev
      link
      fedilink
      arrow-up
      3
      ·
      1 day ago

      Not to take away from your very good point, but I think the word you might be looking for is “eqivalence”.

    • expr@programming.dev
      link
      fedilink
      arrow-up
      5
      ·
      2 days ago

      99.99% of the time you want to compare by value, which is why languages defaulting to comparing by reference is a stupid default.

    • calcopiritus@lemmy.world
      link
      fedilink
      arrow-up
      5
      ·
      2 days ago

      There are use cases. Like containers where the pointer to the object itself is the key (for example a set). But they are niche and should be implemented by the standard library anyway. One of the things I hate most about Java is .equals() on strings. 99.999% of times you compare strings, you want to compare the contents, yet there is a reserved operator to do the wrong comparison.

      • marcos@lemmy.world
        link
        fedilink
        arrow-up
        1
        ·
        2 days ago

        Java has the hash interface for using in containers. You don’t need to override equality for it.

  • flamingo_pinyata@sopuli.xyz
    link
    fedilink
    arrow-up
    22
    ·
    3 days ago

    You’re using Java, there’s your problem

    • Kairos@lemmy.today
      link
      fedilink
      arrow-up
      8
      arrow-down
      2
      ·
      3 days ago

      This syntax isn’t actually a problem by itself. Go does this too (no operator overloading)

      • Gremour@lemmy.world
        link
        fedilink
        arrow-up
        4
        arrow-down
        1
        ·
        2 days ago

        In Go you can compare structure instances with == (by value). You can also compare pointers (in which case they can be different even if values are equal). You get what you ask for.

        Also, I’ve never needed “Equals” method in Go.

        • Kairos@lemmy.today
          link
          fedilink
          arrow-up
          5
          ·
          2 days ago

          I think you can also == two structs in Java, but not classes.

  • NeatNit@discuss.tchncs.de
    link
    fedilink
    arrow-up
    4
    ·
    2 days ago

    Where’s the original post?

    • ChaoticNeutralCzech@feddit.org
      link
      fedilink
      English
      arrow-up
      15
      ·
      2 days ago

      https://vger.to/lemmy.world/post/9716240

    • ZILtoid1991@lemmy.worldOP
      link
      fedilink
      arrow-up
      8
      ·
      2 days ago

      No longer on the internet, due to the OP’s instance is now defunct.

      • yaroto98@lemmy.world
        link
        fedilink
        arrow-up
        5
        ·
        2 days ago

        It was probably on AWS

        • ChaoticNeutralCzech@feddit.org
          link
          fedilink
          English
          arrow-up
          6
          ·
          2 days ago

          OP’s website makmarian.com still works despite all the == usage

      • ChaoticNeutralCzech@feddit.org
        link
        fedilink
        English
        arrow-up
        3
        ·
        2 days ago

        Not really true, instances that were around to federate with kbin.social have a copy, even a preview image (see my other comment).

Programmer Humor@programming.dev

programmer_humor@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: !programmer_humor@programming.dev

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

  • Keep content in english
  • No advertisements
  • Posts must be related to programming or programmer topics
Visibility: Public
globe

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

  • 1.19K users / day
  • 3.85K users / week
  • 9.69K users / month
  • 19.2K users / 6 months
  • 1 local subscriber
  • 27K subscribers
  • 1.24K Posts
  • 30.4K Comments
  • Modlog
  • mods:
  • adr1an@programming.dev
  • Feyter@programming.dev
  • BurningTurtle@programming.dev
  • Pierre-Yves Lapersonne@programming.dev
  • BE: 0.19.13
  • Modlog
  • Instances
  • Docs
  • Code
  • join-lemmy.org