Arc Forumnew | comments | leaders | submitlogin
3 points by tokipin 5993 days ago | link | parent

remember also that Arc autodestructurizes arguments based on the parameter list (example: http://arclanguage.org/item?id=6125.) scheme-style def would would conceptually interfere with that

though maybe scheme autodestructurizes like that also? i don't know



1 point by conanite 5992 days ago | link

arc lets us write

  (def foo args ...

  (def foo (x y . rest) ...
so that args is the list of all arguments, and rest is the list of all arguments after the first two. I suppose the equivalent scheme-ish way would be

  (def (foo . args) ...

  (def (foo x y . args) ...
I like the fact that arc has no special &rest keyword, that rest args just fall out of the way lists are constructed.

I haven't used scheme so I'm not qualified to comment (but obviously that's not stopping me), but to this n00b it makes sense that the parameter list is distinct from the function name. And as you mention it makes named functions look more similar to anonymous functions. So I have less thinking to do when I'm looking at a parameter list.

-----