• FMT99@lemmy.world
      link
      fedilink
      arrow-up
      2
      ·
      5 months ago

      We do this in Ruby all the time, we just prefer methods over variables, usually.

      def authorized?
        current_user&.authorized?
      end
      
      • cytokine0724@sh.itjust.works
        link
        fedilink
        arrow-up
        2
        ·
        5 months ago

        I’m a principal backend engineer routinely writing Ruby for my day job, so I’m familiar, lol. But you can’t do it for local variables and that just sucks. Definitely a +1 for Elixir.