Arc Forumnew | comments | leaders | submitlogin
2 points by ryantmulligan 6170 days ago | link | parent

While I don't doubt that this increases code brevity, an example of the effect of your macro on code size would be nice.


1 point by drcode 6170 days ago | link

It would have zero effect on program size if there are no undeclared parameters, so in the default case the code remains identical to the previous behavior.

In terms of token count, by itself this feature might lead to a modest 2% token count decrease. It would probably go up to 5%-10% if combined with a partial application feature, such as described in http://arclanguage.org/item?id=645

I plan on creating an improved version of this that includes partial application and give more examples with more impressive decreases in token count.

-----

1 point by ryantmulligan 6169 days ago | link

I'd love to see even 1 example.

-----

1 point by drcode 6168 days ago | link

well, the splitn in the top level post showed a decreased token count (the very last line of the splitn function could be removed) but i'm working on something clearer...

-----