Arc Forumnew | comments | leaders | submitlogin
2 points by rocketnia 5244 days ago | link | parent

I was thinking the same thing! I wonder if there's a more widely-applicable convention this can tend toward: Put simple, enum-like arguments at the beginning, so that they can blend in with the function name.

You could do the same thing with isa. I'm not sure what it would best be called, but it would make acons even more redundant.

  (mac a- (type x)
    `(isa ,x ',type))
  (def another-acons (x)
    (a- cons x))
This particular example probably isn't quite as useful; if I have a complex expression, I usually want to use the result itself at some point, rather than just passing it to isa. Maybe there's a better example out there, though.


1 point by akkartik 5243 days ago | link

> Put simple, enum-like arguments at the beginning, so that they can blend in with the function name.

Languages like haskell do a better job explicitly encouraging this practice - you can curry functions with frequently-used args. Eventually you figure out that it's useful to put curryable arguments at the start.

-----