not digg
  • Communities
  • Create Post
  • Create Community
  • heart
    Support Lemmy
  • search
    Search
  • Login
  • Sign Up
ZILtoid1991@lemmy.world to Programmer Humor@programming.dev · 1 day ago

Accidental shitpost

lemmy.world

message-square
17
fedilink
132

Accidental shitpost

lemmy.world

ZILtoid1991@lemmy.world to Programmer Humor@programming.dev · 1 day ago
message-square
17
fedilink
alert-triangle
You must log in or register to comment.
  • ImgurRefugee114@reddthat.com
    link
    fedilink
    arrow-up
    79
    ·
    1 day ago

    The joke is even funnier on my client

    • ChaoticNeutralCzech@feddit.org
      link
      fedilink
      English
      arrow-up
      12
      ·
      23 hours 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
    8
    ·
    20 hours 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.

    • Redkey@programming.dev
      link
      fedilink
      arrow-up
      1
      ·
      11 minutes 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
      4
      ·
      14 hours 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
      4
      ·
      19 hours 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
        ·
        18 hours 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
    21
    ·
    1 day ago

    You’re using Java, there’s your problem

    • Kairos@lemmy.today
      link
      fedilink
      arrow-up
      7
      arrow-down
      2
      ·
      1 day 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
        ·
        edit-2
        20 hours 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
          ·
          18 hours ago

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

  • NeatNit@discuss.tchncs.de
    link
    fedilink
    arrow-up
    4
    ·
    1 day ago

    Where’s the original post?

    • ChaoticNeutralCzech@feddit.org
      link
      fedilink
      English
      arrow-up
      14
      ·
      23 hours ago

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

    • ZILtoid1991@lemmy.worldOP
      link
      fedilink
      arrow-up
      8
      ·
      1 day ago

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

      • yaroto98@lemmy.world
        link
        fedilink
        arrow-up
        5
        ·
        23 hours ago

        It was probably on AWS

        • ChaoticNeutralCzech@feddit.org
          link
          fedilink
          English
          arrow-up
          6
          ·
          23 hours ago

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

      • ChaoticNeutralCzech@feddit.org
        link
        fedilink
        English
        arrow-up
        3
        ·
        23 hours 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.

  • 2.24K users / day
  • 3.66K users / week
  • 9.58K users / month
  • 19.2K users / 6 months
  • 1 local subscriber
  • 26.9K subscribers
  • 1.85K Posts
  • 26.9K Comments
  • Modlog
  • mods:
  • Feyter@programming.dev
  • adr1an@programming.dev
  • BurningTurtle@programming.dev
  • Pierre-Yves Lapersonne@programming.dev
  • BE: 0.19.5
  • Modlog
  • Instances
  • Docs
  • Code
  • join-lemmy.org