ylixir / phap

Php Has Another Parser
GNU Lesser General Public License v3.0
4 stars 1 forks source link

moar function name changes #29

Closed ylixir closed 5 years ago

ylixir commented 5 years ago

rename all to repeat, change it to be postfix in the oop interface

change with back to and

ylixir commented 5 years ago

the thing with reduce is that the arguments are ass backwards. if i fix the ordering it will be confusing to users. if i don't fix it, it will be a huge pain point when we start allowing partial applications.

if i use the name "fold" instead, that may be unexpected to users as well.

i would like to extend this api to multiple languages at some point, so catering to a php specific verb isn't good, and it's definitely not worth keeping the broken parameter list.

further, using fold instead of reduce signals to the user that this is different from reduce somehow (the arguments are different).

so we rename reduce and fix the argument order to have the list last