Jonathan Carroll on Nostr: I understand the appeal of encapsulation in this post but I'm wondering how people ...
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.
Published at
2024-05-26 23:29:14Event JSON
{
"id": "f92df767e1b5db03db01de3f38cbfbe6d284c8ce7cd6447708c0bb529d84c33a",
"pubkey": "b7f4998efbebfd0d675e0671c492f7610c7cef16e7619798bc7e7611cbeb10c6",
"created_at": 1716766154,
"kind": 1,
"tags": [
[
"t",
"rstats"
],
[
"proxy",
"https://fosstodon.org/users/jonocarroll/statuses/112509986726700020",
"activitypub"
]
],
"content": "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? \n\nPass 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.\n\nNot to say that FP forbids encapsulation at all, it's just something I've not seen discussed a a lot in that space.",
"sig": "9c2d687edbe6515150f802b838db24f5f27a22e09c3b6ea4a51be0647c5db9c0a15c6d1cbd895655578f9fb3d7ae5073300309b8a0c3916e816d4123b870ded0"
}