@[email protected] to Programmer HumorEnglish • 6 months agoFunctional bros be likelemmy.worldimagemessage-square62fedilinkarrow-up1312arrow-down117
arrow-up1295arrow-down1imageFunctional bros be likelemmy.world@[email protected] to Programmer HumorEnglish • 6 months agomessage-square62fedilink
minus-square@[email protected]linkfedilink1•6 months agoYeah! For example, if the language allows closures to capture state, they can act like properties on an instance.
minus-square@[email protected]linkfedilink1•6 months agoA closure is a function with captured state. An object is state with methods.
Yeah! For example, if the language allows closures to capture state, they can act like properties on an instance.
I don’t see the duality
A closure is a function with captured state. An object is state with methods.