On Thu, Nov 10, 2011 at 8:34 AM, Sergiu Dumitriu <[email protected]> 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
+1 for $discard or $dummy. $ok and $output are really bad imo. They are too generic and don't explain the fact that the output is not used later on. Thanks, Florin Ciubotaru
$ok is the shortest, thus easier to type, faster to parse, and lighter on the total size of the wiki. 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". -- Sergiu Dumitriu http://purl.org/net/sergiu/ ______________________________**_________________ devs mailing list [email protected] http://lists.xwiki.org/**mailman/listinfo/devs<http://lists.xwiki.org/mailman/listinfo/devs>