News for hackers. Stuff that matters.
Re:Pattern Matching in Ruby 2.7 (2019) by gdy on Thursday January 09, 2020 @04:21AM (#21999690)
"it's called non-leaky abstraction"

Is there such thing?

Re:Pattern Matching in Ruby 2.7 (2019) by pwm on Thursday January 09, 2020 @05:29AM (#22000010)
Sure. Math based abstractions are non-leaky. This is one of the main thing FP people rave about. Eg. map works without bias on all functors regardless whether the concrete thing is a list or a tree or an IO action, etc...
Re:Pattern Matching in Ruby 2.7 (2019) by gdy on Friday January 10, 2020 @07:53PM (#22017197)
For example, different implementations may have different performance characteristics depending on the object they are operating on. This way implementation details leak out through the time or space complexity, or through the constant factor.
Re:Pattern Matching in Ruby 2.7 (2019) by wwright on Thursday January 09, 2020 @07:31AM (#22000629)
Have you heard of “divide by zero?” ;)

(I agree that math abstractions are less leaky than others, of course)

Re:Pattern Matching in Ruby 2.7 (2019) by omaranto on Thursday January 09, 2020 @10:00AM (#22001704)
I'm confused: how is dividing by zero an example of a leaky abstraction in mathematics?