[rules-dev] accumulate to acc - Don't call it acc(umulate)

Mario Fusco mario.fusco at gmail.com
Mon Aug 22 09:41:23 EDT 2011


I don't think that to focus on the name of the keyword is so important.
However I also don't like 'acc' for at least 2 reasons: first I don't like
abbreviation and even worse being that keyword the abbreviation of another
already existing (even if deprecated) one can generate confusion.

'for' can be a better option even if we will have to use them in statements
like "from for(...)" that could be a bit odd and cacophony.

For a similar (even if not so powerful) feature in my lambdaj library I used
'aggregate', that maybe could be closer to what the keyword actually should
be used for.

In the end, my favorite option is 'fold' for a few reasons:

1. It's short
2. IMHO sounds slightly better than 'for' in the contexts where we are going
to use it
3. People who knows a bit of functional programming is familiar with the
meaning of 'fold' that is also quite similar to what the new feature will do
even if, once again, our one will be more powerful and rich than the
"classic" fold

Mario
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-dev/attachments/20110822/5e2a92f4/attachment.html 


More information about the rules-dev mailing list