On 11/07/2018 21:21, Sean P. DeNigris wrote:
Paul DeBruicker wrote
It also seems like a "how much milk do you like in your coffee?" choice where the tradeoffs between one vs the other isn't high and the code in action will let you know whether you've got it right.
+1. I also use both. My heuristic is for shorter methods, and methods with one argument, I tend to lean toward fullNameString and when I need to differentiate multiple arguments or reference the arg way down in a method (probably a good sign to refactor) I lean the other way. But I think Paul said it best that it's probably more a personal style/aesthetic choice than anything worth spending a lot of energy on.
+1 to both. Although a in method like: #setFirstName:lastName: I usually use firstNameString and lastNameString respectively, mostly to not clash with instance variables firstName and lastName. Another criteria is to never name a parameter as aSomething if Something isn't a class (and of course the class of the passed argument). The same applies to #asSomething. And _never_ use anObject as name, unless it really can hold any class of object. -- Esteban A. Maringolo