LibreTechni.ca
  • Communities
  • Create Post
  • Create Community
  • heart
    Support Lemmy
  • search
    Search
  • Login
  • Sign Up
ZILtoid1991@lemmy.world to Programmer Humor@programming.dev · 5日前

Pointers explained:

lemmy.world

message-square
77
fedilink
566

Pointers explained:

lemmy.world

ZILtoid1991@lemmy.world to Programmer Humor@programming.dev · 5日前
message-square
77
fedilink
  • MonkderVierte@lemmy.zip
    link
    fedilink
    arrow-up
    8
    ·
    edit-2
    5日前

    So, googling it, the general premise is you should use smart pointers instead to avoid crashes. Got it.

    • MinnesotaGoddam@lemmy.world
      link
      fedilink
      English
      arrow-up
      5
      ·
      4日前

      Uh

      I think I’ll just let the cat drive instead

    • DahGangalang@infosec.pub
      link
      fedilink
      arrow-up
      10
      ·
      5日前

      Smart pointers implies C++, which is not the right answer.

      • MonkderVierte@lemmy.zip
        link
        fedilink
        arrow-up
        5
        ·
        4日前

        Unlike many other programming languages, which are often picked up on the go from tutorials found on the Internet, few are able to quickly pick up C++ without studying a well-written C++ book. It is way too big and complex for doing this. In fact, it is so big and complex, that there are very many very bad C++ books out there. And we are not talking about bad style, but things like sporting glaringly obvious factual errors and promoting abysmally bad programming styles.

        https://stackoverflow.com/questions/388242/the-definitive-c-book-guide-and-list

        • mnemonicmonkeys@sh.itjust.works
          link
          fedilink
          English
          arrow-up
          6
          ·
          edit-2
          4日前

          Considering that most of the “answers” I’ve found on StackOverflow were complete dogshit, I’m wary of this reading list

    • CanadaPlus@lemmy.sdf.org
      link
      fedilink
      arrow-up
      3
      ·
      edit-2
      4日前

      They all have footguns that cause different crashes.

      If you want to do explicit memory access without inevitable safety problems, you need Rust. That’s the whole hype with Rust.

      • MonkderVierte@lemmy.zip
        link
        fedilink
        arrow-up
        1
        ·
        edit-2
        4日前

        But… per-process-isolation is a hardware feature, no?

        • psud@aussie.zone
          link
          fedilink
          English
          arrow-up
          1
          ·
          1時間前

          So you really should implement it in your compiler so you don’t contravene it

        • CanadaPlus@lemmy.sdf.org
          link
          fedilink
          arrow-up
          2
          ·
          edit-2
          3日前

          Sure, that may be (it’s definitely not in userspace). But don’t forget it works by crashing your program.

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.

  • 293 users / day
  • 2.34K users / week
  • 7.73K users / month
  • 17.1K users / 6 months
  • 1 local subscriber
  • 31.8K subscribers
  • 1.32K Posts
  • 26K Comments
  • Modlog
  • mods:
  • adr1an@programming.dev
  • Feyter@programming.dev
  • BurningTurtle@programming.dev
  • Pierre-Yves Lapersonne@programming.dev
  • BE: 0.19.5
  • Modlog
  • Instances
  • Docs
  • Code
  • join-lemmy.org