On Thu, Nov 10, 2011 at 09:23, Andreas Jonsson <[email protected]> wrote:

> 2011-11-10 08:05, Vincent Massol skrev:
> >
> > 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
>
> How about:
>
> 9. $void
>

Very nice, short and meaningful !
I am +1


>
> But I don't have a strong opion about this.
>
>
> >> $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
> >
>
> _______________________________________________
> 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

Reply via email to