Arc Forumnew | comments | leaders | submitlogin
Waterhouse's accumulate needs keyword args (github.com)
4 points by akkartik 2508 days ago | 2 comments


1 point by akkartik 2508 days ago | link

Some observations:

1. I see why common lisp uses the &optional delimiter and parens around each optional arg: long lists of alternating vars and defaults are hard to read.

2. I see why racket asks for both keyword name and argument name[1] when creating keyword args: otherwise you have to trade off readability within the function against readability of function calls.

[1] http://arclanguage.org/item?id=12591

-----

2 points by evanrmurphy 2507 days ago | link

> long lists of alternating vars and defaults are hard to read

Maybe some strategic whitespace could help:

  (def accumulate (over ? starting nil  taking car  
                          folding-with cons 
                          next cdr  until no)
    ... )

-----