Arc Forumnew | comments | leaders | submitlogin
1 point by tokipin 6070 days ago | link | parent

well, as a special form i don't think it would have trouble differentiating between () and nil. () seems to be different from '() even though (is () '()) is t


1 point by eds 6070 days ago | link

'() is (quote ()) while () is (). You won't notice the difference if you pass both to a normal function but you might if you passed both to a macro or special form.

-----

2 points by tokipin 6067 days ago | link

it occurred to me that (fn (. args) ...) would be decent and fairly consistent, though i don't know how currently possible it is

-----

1 point by eds 6067 days ago | link

While superficially (fn (. args) ...) may look decent, it is entirely inconsistent with the Arc reader. Function definitions have to be entirely representable in lists, and the example you list above is not a valid list. Not only would this break the current Arc, but you would have to reimplement the entire reader that Arc currently borrows from Scheme. Not to mention that you would have to define what it even means to have a cons with no 'car field.

-----