Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

"it's called non-leaky abstraction"

Is there such thing?



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...


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.


Have you heard of “divide by zero?” ;)

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


I'm confused: how is dividing by zero an example of a leaky abstraction in mathematics?




Consider applying for YC's Winter 2027 batch! Applications are open till November 2.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: