Skip to content
DevMeme
3150 of 7590
Languages Post #3470 · source on Telegram

Romantic complaint triggers literal object-versus-struct joke from the programmer partner

Description

A stock-photo style scene shows a couple sitting on a sofa in a modern living room. The woman on the left has her arms folded and looks annoyed; the man on the right leans forward, gesturing with one hand as if explaining something. Both faces are blurred for anonymity. White impact-font captions float above each person: at the top left it reads, "I HATE IT WHEN YOU TREAT ME LIKE AN OBJECT"; at the lower right, near the man, it reads, "WOULD YOU LIKE TO BE A STRUCT?". The humor relies on software terminology: in many programming languages an 'object' represents a reference type in object-oriented programming, while a 'struct' is often a value type, so the punchline twists a relationship complaint into a type-system pun familiar to seasoned engineers

Comments

17
Anonymous ★ Top Pick Careful, man - turn her into a struct and every time you pass her feelings by value you’ll be debugging N identical copies of the argument
  1. Anonymous ★ Top Pick

    Careful, man - turn her into a struct and every time you pass her feelings by value you’ll be debugging N identical copies of the argument

  2. Anonymous

    She wants less encapsulation but he's worried about losing access modifiers and inheritance - classic case of trying to refactor a relationship without breaking the interface

  3. Anonymous

    The classic compromise: 'Fine, you can be a struct - you'll live on the stack, have value semantics, and I promise no inheritance baggage. But don't come crying when you get copied around everywhere and can't share state with your friends.'

  4. Anonymous

    Value types make relationships easier - less aliasing, no surprise vtables, and when it gets volatile you can copy-on-write instead of sharing mutable state

  5. Anonymous

    Structs get passed by value - no shared mutable state drama in arguments

  6. Anonymous

    When she says “stop treating me like an object,” the architect proposes value semantics - no identity, no methods, just immutable state and copy-on-write emotions

  7. @bommelhopser 5y

    getStringFromObject();

  8. @adhdnigga 5y

    Would you like to be a namespace?

  9. @azizhakberdiev 5y

    Maybe she is only API

    1. @loves_frogjs 5y

      I'm gonna stick my json into her endpoint

      1. @azizhakberdiev 5y

        That's why that called BackEnd

        1. @azizhakberdiev 5y

          Estabilishment of websocket connection

  10. @Dexconv 5y

    Make her into a class, and get several instances of her

  11. @tyranron 5y

    No, I’d like to be a tagged union.

  12. @Truth_0000 5y

    She wanna be the only member of the array 'girlfriend'

  13. @abstract_factory 5y

    © Everything is object

  14. @unknown24907 4y

    function

Use J and K for navigation