Jonathan Carroll on Nostr: I understand the appeal of encapsulation in this post ...
I understand the appeal of encapsulation in this post https://testing.googleblog.com/2024/05/avoid-long-parameter-list.html but I'm wondering how people deal with this from a functional programming perspective?
Pass in a new (potentially classed) object? For #rstats, ggplot2::ggplot() comes to mind; we pass in an "aes" mapping rather than e.g. aes_x, aes_y arguments, but I've seen some lengthy parameter lists.
Not to say that FP forbids encapsulation at all, it's just something I've not seen discussed a a lot in that space.
Pass in a new (potentially classed) object? For #rstats, ggplot2::ggplot() comes to mind; we pass in an "aes" mapping rather than e.g. aes_x, aes_y arguments, but I've seen some lengthy parameter lists.
Not to say that FP forbids encapsulation at all, it's just something I've not seen discussed a a lot in that space.