+1 for $void - sounds better
+1 for $discard if we consider the 'standard' that already exists in the
code
Thanks,
Caty
On Thu, Nov 10, 2011 at 14:16, Eduard Moraru <enygma2002(a)gmail.com> wrote:
Hi,
I was using $temp before Sergiu pointed to me that $discard is pretty much
the existing standard already used almost everywhere. There might be some
other places where something other than $discard is used, but I really see
no point in starting to use something else. If we'd start using something
else, we`d still be having at least 2 styles for at least 1-2 years since
nobody would be touching the old code.
So I`m +1 on stabilizing to $discard.
Thanks,
Eduard
On Thu, Nov 10, 2011 at 11:02 AM, Thomas Mortagne <
thomas.mortagne(a)xwiki.com
wrote:
> On Thu, Nov 10, 2011 at 9:23 AM, Andreas Jonsson <aj(a)member.fsf.org>
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
+1, that's what I'm using usually too
>
> 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
devs(a)xwiki.org
http://lists.xwiki.org/mailman/listinfo/devs
_______________________________________________
devs mailing list
devs(a)xwiki.org
http://lists.xwiki.org/mailman/listinfo/devs
--
Thomas Mortagne
_______________________________________________
devs mailing list
devs(a)xwiki.org
http://lists.xwiki.org/mailman/listinfo/devs
_______________________________________________
devs mailing list
devs(a)xwiki.org
http://lists.xwiki.org/mailman/listinfo/devs