I use either $discard or $dummy since I found them more meaningful. I do not like $ok and $output which not really means that we do not care of them.
I agree with Vincent, that size and easy typing is far less important compare to having meaningful name, but I not that it is easier to type "dummy" than "discard". Denis On Thu, Nov 10, 2011 at 08:05, Vincent Massol <[email protected]> wrote: > > On Nov 10, 2011, at 7:34 AM, Sergiu Dumitriu wrote: > > > Hi devs, > > > > Some methods must be captured so that they don't create output when > called from velocity, usually with something like: > > > > #set ($var = $obj.doSomething()) > > > > Where $var is a variable whose content isn't needed and won't be used. > And everyone seems to have his favorite name for it: $discard, $ok, > $ignore... > > > > I'd like to have a single variable name, so that in the end we don't end > up creating 5 different variables for the same goal. So, which one do you > prefer: > > > > 1. $discard > > 2. $discarded > > 3. $ignore > > 4. $ignored > > 5. $ok > > 6. $output > > We can also think of: > > 7. $dummy (I always use this one) > 8. $unused > > > $ok is the shortest, thus easier to type, faster to parse, and lighter > on the total size of the wiki. > > The size is definitely a bad argument. Let's remove all comments it'll > slim down the wiki size⦠yeah! :) > > Faster to type is also not a good argument. Using meaningful variable > names is better. > > > On the other hand, I prefer $discard since it's more meaningful, it > conveys exactly what that line does: "$discard the output of this method > call". > > They're all fine with me except $output. > > Thanks > -Vincent > > _______________________________________________ > devs mailing list > [email protected] > http://lists.xwiki.org/mailman/listinfo/devs > -- Denis Gervalle SOFTEC sa - CEO eGuilde sarl - CTO _______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs

