Dendarii
  • Communities
  • Create Post
  • Create Community
  • heart
    Support Lemmy
  • search
    Search
  • Login
  • Sign Up
Demonen@lemmy.ml to Programmer Humor@lemmy.mlEnglish · 2 years ago

Gotta watch them nil pointers!

lemmy.ml

message-square
24
fedilink
575

Gotta watch them nil pointers!

lemmy.ml

Demonen@lemmy.ml to Programmer Humor@lemmy.mlEnglish · 2 years ago
message-square
24
fedilink
  • P1r4nha@feddit.de
    link
    fedilink
    arrow-up
    60
    ·
    2 years ago

    You gotta allocate your GFs statically or this just keeps happening.

    • Tolookah@discuss.tchncs.de
      link
      fedilink
      arrow-up
      21
      ·
      2 years ago

      I tried to declare my GF global, but she became an astronaut, and I get linking errors

      • xmunk@sh.itjust.works
        link
        fedilink
        arrow-up
        35
        ·
        2 years ago

        Mate, your GF is definitely global. I was able to access her just fine… read AND write.

    • agent_flounder@lemmy.world
      link
      fedilink
      English
      arrow-up
      12
      ·
      2 years ago

      Plus you won’t worry that you forget to free her

      • xmunk@sh.itjust.works
        link
        fedilink
        arrow-up
        11
        ·
        2 years ago

        As low as my opinion on some exes may be, I still don’t believe it’s appropriate to mark them as candidates for garbage collection.

    • datelmd5sum@lemmy.world
      link
      fedilink
      arrow-up
      10
      ·
      2 years ago

      I’d add an imaginary boolean flag to the GF class and always have an initial GF where imaginary == True.

    • N3Cr0@lemmy.world
      link
      fedilink
      arrow-up
      9
      ·
      2 years ago

      The struct and its CRUD functions seem to be all implemented. Problem is: The Create method is never be called.

      • P1r4nha@feddit.de
        link
        fedilink
        arrow-up
        8
        ·
        2 years ago

        Might be a problem with the factory then.

    • 30p87@feddit.de
      link
      fedilink
      arrow-up
      5
      ·
      2 years ago

      *‘^You gotta allocate you GF$’

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: [email protected]

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.

  • 15 users / day
  • 39 users / week
  • 181 users / month
  • 1.62K users / 6 months
  • 0 local subscribers
  • 35.6K subscribers
  • 1.78K Posts
  • 36.8K Comments
  • Modlog
  • mods:
  • AgreeableLandscape@lemmy.ml
  • cat_programmer@lemmy.ml
  • BE: 0.19.9
  • Modlog
  • Instances
  • Docs
  • Code
  • join-lemmy.org