TIL that the main difference between a Proc and a lambda in Ruby is that lambdas act like how I would already assume Procs do
@hirojin I mean this is just my experience with Ruby
@hirojin yes
@cat yeah that "external return" thing is extremely jank
like I can come up with all sorts of guesses for what the exact semantics of that are and they are all extremely weird
@cat would you consider this confusion of the highest order?
@cat (but actually though, oof yes)
@thingywott I think this is a mathematics joke and I have to warn you I don’t actually know what a mathematic is
@cat oops, sorry..!
passing around lambdas and procs are just examples of high order programming
@thingywott oh ok
that’s a weird way to put it I guess
i.e. Procs and lambdas are both callable, but in a Proc, arguments are optional and “return” will return in the context of the calling method, whereas a lambda’s arguments act like a method’s, and are required unless given a default and “return” returns only from the lambda