Comment

Comment by willlll

Overall sorbet has been good and useful, so thank you. But you just have to be careful when you're not using the same version of ruby that stripe uses. I recently got hit by a bug:

    # typed: strict
    extend T::Sig

    sig {params(x: Integer, y: String).void}
    def run(x:, y:)
      puts(x + 1, y)
    end

    args = {
      x: 1,
      y: "Hi"
    }

    run args
type checks just fine in sorbet, but is an error in ruby 3+. It works though (with errors) in 2.7 and lower which is what Stripe uses from what I gather.
parent willlll 4 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton