Default Arguments: what's the general consensus about them? To give an
example, so we're all on the same page, this is the syntax I'm talking
about:
function foo($bar = "some value"){
}
So, in the past when I was programming with PHP a lot, I found myself
using default arguments more and more because they were so convenient.
But in the back of my mind, something about them seemed
somewhat...slop py. I've never had the privilege of working on a
project quite large enough for architectural weaknesses to really show
their strain, so I'd like to pose this question to other minds, to see
if any of you have input about this syntactical tool.
Thanks!
example, so we're all on the same page, this is the syntax I'm talking
about:
function foo($bar = "some value"){
}
So, in the past when I was programming with PHP a lot, I found myself
using default arguments more and more because they were so convenient.
But in the back of my mind, something about them seemed
somewhat...slop py. I've never had the privilege of working on a
project quite large enough for architectural weaknesses to really show
their strain, so I'd like to pose this question to other minds, to see
if any of you have input about this syntactical tool.
Thanks!
Comment