Closed tienvx closed 8 months ago
I think the convention of prefixing methods with set
or with
or nothing is really up to you and what makes most sense in the language.
For example, languages that allow overloading of functions might have the same function as both the setter and getter based on the presence of an argument. Whereas languages which do not support this might instead have separate functions. You should follow what makes most sense for PHP.
In Python, I'm also considering having a clear nomenclature to distinguish whether the pact is being modified or the specific interaction. I haven't settled yet on the nomenclature yet though.
I'm not sure:
So I invented 3 methods in builder:
Is this okay?
Should I change to
setKey
,setPending
setComments
? Should I change towithKey
,withPending
,withComments
?What do you think? cc @YOU54F @JP-Ellis