Arc Forumnew | comments | leaders | submitlogin
1 point by schtog 6040 days ago | link | parent

and so:

  (defmacro def (&rest body)
    `(defun ,@body))

and there will be no sideffects of this?


1 point by cooldude127 6039 days ago | link

except you wont be able to use arc's cool dotted list syntax for arguments. instead of

  (def my-fun (a . rest)
    ...)
you have to use CL's &rest syntax

  (def my-fun (a &rest rest)
    ...)

-----

1 point by schtog 6039 days ago | link

but using def and mac with these definitions:

  (defmacro mac (&rest body)
	  `(defmacro ,@body))

  (defmacro def (&rest body)
	  `(defun ,@body))

is EXACTLY the same as writing defmacro and defun?

-----

1 point by cchooper 6038 days ago | link

yep

-----

1 point by wfarr 6039 days ago | link

Personally (and this may well just be me) I prefer the latter.

-----

1 point by dreish 6039 days ago | link

What does it buy you, other than four more steps toward carpal-tunnel syndrome?

-----