DEV Community

Discussion on: Self-Documenting Function Calls

Collapse
 
bytebodger profile image
Adam Nathaniel Davis

Yeah, I was originally intending to include object-wrapped arguments in this post. But then I really thought that I wanted to make that its own future post, cuz it can be really useful - but there are at least some potential downsides.

I wanted to write this particular post from the perspective of how to call a function in this manner when you either don't have access to write/define/clarify the function itself, or when it's just not practical for you to do so.

Also, there are many built-in functions, or core-library functions, that you basically have no option except to call them as-is. So, in those cases, there are still ways to call them such that future readers can clearly see what's being passed in.

Collapse
 
pclundaahl profile image
Patrick Charles-Lundaahl

Ah! That makes a lot of sense. Thanks!