• pinchcramp
    link
    fedilink
    English
    34
    edit-2
    1 year ago

    Bash script. Not necessarily hard to understand but very unintuitive in my opinion. I’ve written so much bash script over the years and still have to look up how to do simple things like iterate over associative arrays or do basic string manipulation. Maybe it’s just a me problem though 🤷

    • Lupec
      link
      fedilink
      61 year ago

      Yup, same. I’ve been a developer for years and used to code way before that and to this day I can’t write any non trivial bash script without looking up half a dozen of things lol, glad I’m not alone.
      I’ve recently come across nushell, and it’s everything I’ve ever wanted when it comes to shell scripting. It’s not POSIX compliant so you can’t just run it anywhere but it helps keep my sanity in personal projects and whatnot. See also, elvish, xonsh.

    • JackbyDev
      link
      fedilink
      English
      31 year ago

      Yeah, anything to do with iterative over strings. Basically anything that involves IFS is unintuitive.

    • UFO
      link
      fedilink
      21 year ago

      I don’t think it’s just a you problem :)

      I’ve been curious to try fish or zsh to hopefully run into less weirdness.

      • pinchcramp
        link
        fedilink
        English
        2
        edit-2
        1 year ago

        I don’t think it’s just a you problem :)

        I didn’t think so. I guess Reddit has conditioned me to not state my opinion without a disclaimer, lest someone wants to start arguing :D

        Btw. I don’t think you’ll find ZSH more intuitive to program. While it is an awesome interactive shell, the scripting part is Bash taken to the extreme.

    • @atheken@programming.dev
      link
      fedilink
      21 year ago

      My running joke, after four different friends told me they were using ChatGPT to help them with it, is that the language is so hard to learn that we invented an entirely new class of AI to help.

      It’s a joke, of course, but it does have some “surprising” syntax, since some stuff is whitespace sensitive, and there are subtle differences between () and [] and [[ ]], for example. All of that’s due to the long history of shell behavior, so I don’t necessarily blame bash.