Hi,

Out of curiosity, here are some numbers regarding current usage of the
proposed terms:

[Enygma@Enygma xwiki-platform]$ grep "\$discard" . -R | wc -l
544
[Enygma@Enygma xwiki-platform]$ grep "\$void" . -R | wc -l
5
[Enygma@Enygma xwiki-platform]$ grep "\$dummy" . -R | wc -l
6
[Enygma@Enygma xwiki-platform]$ grep "\$ignore" . -R | wc -l
0
[Enygma@Enygma xwiki-platform]$ grep "\$temp" . -R | wc -l
234
[Enygma@Enygma xwiki-platform]$ grep "\$ok" . -R | wc -l
121
[Enygma@Enygma xwiki-platform]$ grep "\$output" . -R | wc -l
25

Thanks,
Eduard

On Thu, Nov 10, 2011 at 2:16 PM, Eduard Moraru <[email protected]> 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 <
> [email protected]> wrote:
>
>> On Thu, Nov 10, 2011 at 9:23 AM, 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
>>
>> +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
>> >> [email protected]
>> >> http://lists.xwiki.org/mailman/listinfo/devs
>> >>
>> >
>> > _______________________________________________
>> > devs mailing list
>> > [email protected]
>> > http://lists.xwiki.org/mailman/listinfo/devs
>> >
>>
>>
>>
>> --
>> Thomas Mortagne
>> _______________________________________________
>> devs mailing list
>> [email protected]
>> http://lists.xwiki.org/mailman/listinfo/devs
>>
>
>
_______________________________________________
devs mailing list
[email protected]
http://lists.xwiki.org/mailman/listinfo/devs

Reply via email to