OK, first of all, I am not a programmer. (yes, I heard the “thank god”) Perhaps I could make the top example simpler.

But anyway, I kind of like goto too much. I find it more intuitive to just jump around and re-use parts rather than think about how to do loops without too much nesting.

In high school, we only did Python. I really wanted to do goto in Python as well, but all I found was this April fools’ goto module.

Now in college we’re starting with C, and I am starting with Bad HabitsTM.

Anyway, tagging every line was BASICally just for the joke, but it is useful to just jump to any random line.

  • crimsonpoodle@pawb.social
    link
    fedilink
    arrow-up
    4
    ·
    13 hours ago

    Gotos are cool, it’s the way assembly works, if your mind likes them then more power to you. But if you work on teams then it’s a nogoto. Most of the functionality can be replaced with things that most people find easier. Just enjoy your time with and don’t ever is Kotlin. Fucking let me fucking return. I see them now those snooty opinionated safety fanatics “ooooh it will be so elegant in the closures the last value will be the return” bs.

    • dejected_warp_core@lemmy.world
      link
      fedilink
      arrow-up
      2
      ·
      12 hours ago

      the last value will be the return

      This is the one thing that I really dislike about Rust. All this talk about safety and the return value/expression reads like a typeo w/o a semicolon. It even has return anyway since there are lots of scenarios that’s needed for an optimal path.