I keep seeing this coding pattern from an old cons...
# random
d
I keep seeing this coding pattern from an old consultant, all the variables are properties of a single object. I don't see the benefit, aside from maybe logging the whole object on error. Is there a name for this?
to be clear, old consultant == ex-consultant, not that they were old =P
ah, actually I think I have found the reason..
c
I have objects for all of my method params (but not 1 for ALL methods.. just each method's input is an object)
A) JS uses pass by reference for objects and B) I don't wanna deal w/ 15 params
also allows you to be passive in programming and not worry about order of variables.
d
"The God object is an example of an anti-pattern and a code smell" Haha, what? I've never heard of "code smell" before, TMYK
and yeah, the best function signature in JS is just
function(object)
😙🤌
speaking of method param objects, I would value your opinion on my question just posted in #C29HQS63G: https://netsuiteprofessionals.slack.com/archives/C29HQS63G/p1661726842103229