• smeg@feddit.uk
    link
    fedilink
    English
    arrow-up
    3
    ·
    5 months ago

    JavaScript: error: undefined is undefined or some nonsense like that. Sorry to repeat the old JavaScript bad, but I really hate debugging JavaScript!

  • Lunya \ she/it@iusearchlinux.fyi
    link
    fedilink
    arrow-up
    2
    ·
    5 months ago

    Meanwhile Rust: you might get an error at line 45 word 3 because it assumes variable foo is an int32 but it could be (whatever else idk), let’s not compile this before you correct this by changing line 43 in this specific way. Here’s the before and after code snippets so you can just copy-paste the fix.

          • Tja@programming.dev
            link
            fedilink
            arrow-up
            2
            ·
            5 months ago

            If you want the same traces as Java and python in the meme, you leave them, if you don’t you strip them. Or you ship them separately. You decide, like a big boy.

          • Ziglin@lemmy.world
            link
            fedilink
            arrow-up
            1
            ·
            4 months ago

            Have the user compile it without debug symbols to save space. If the user has a problem they can just recompile it with debug symbols and see what went wrong with gdb.

  • SlopppyEngineer@lemmy.world
    cake
    link
    fedilink
    arrow-up
    1
    ·
    5 months ago

    And C/C++ are like that by design. Compiled languages were new and the developers were afraid additional checks would decrease performance. It was certainly performant in racing toward a crash.

  • DannyBoy@sh.itjust.works
    link
    fedilink
    English
    arrow-up
    1
    ·
    5 months ago

    It’s been a minute since I used C/Cpp but if you compile with debugging symbols and using gdb give you info like in Java? At least the location of the crash.

    • Ziglin@lemmy.world
      link
      fedilink
      arrow-up
      2
      ·
      4 months ago

      And much more, it tells you each operation it goes through, where it is in the code, what’s in the registers and more.

    • Miaou@jlai.lu
      link
      fedilink
      arrow-up
      1
      ·
      5 months ago

      And then you realise the program doesn’t crash when compiling with debug symbols 😢

      • Buddahriffic@lemmy.world
        link
        fedilink
        arrow-up
        1
        ·
        5 months ago

        Then it’s time to have a closer look at how your concurrent threads are behaving and where you missed a sync point or mutex.

  • Ziglin@lemmy.world
    link
    fedilink
    arrow-up
    1
    ·
    4 months ago

    The code editor I had to use for Java once didn’t give me anything like that.

    Meanwhile for C you can just use gdb, it’s great!