Re: Clojure's syntax design: macros vs functions

2009-03-05 Thread Konrad Hinsen
On 05.03.2009, at 02:03, Elena wrote: I wonder if Clojure does employ the same syntax either for macros and functions by design or it's just a remainder of Lisp. I think that a I am sure it's by design, just as for Lisp. Remember that Lisp has been around for 50 years and has been used by

Re: Clojure's syntax design: macros vs functions

2009-03-05 Thread Joshua Fox
expressions get evaluated and which don't, at least when you are dealing with side effects. I think that this is the key point. The Clojure syntax is built around its pure-functional core. Side effects are dangerous, and the rule there is mutator beware. Joshua

Re: Clojure's syntax design: macros vs functions

2009-03-05 Thread Elena
On 5 Mar, 02:22, Matt Revelle mreve...@gmail.com wrote: Was their a situation where not knowing if a form was a macro bit you? Considering that many frequently used built-ins are implemented as macros, capitalizing or otherwise annotating-in- name would be annoying. No. What bothers me is

Re: Clojure's syntax design: macros vs functions

2009-03-05 Thread Elena
(Warning: long post) Thank you all for the answers, especially to Konrad who suggested thinking in terms of forms instead of functions and macros. He's right that I'm a newcomer and maybe I've rushed a bit by calling it a flaw. I'll try thinking about it more. As I started to learn Lisp, the

Re: Clojure's syntax design: macros vs functions

2009-03-05 Thread Mike Benfield
FWIW: I have thought the same thing in the past. But, in practice, this has never been a problem for me. Not once. Now I haven't written quadrillions of lines of Lisp, but it doesn't seem to have been a problem for those who have either. One thing to keep in mind is that you don't typically

Clojure's syntax design: macros vs functions

2009-03-04 Thread Elena
I wonder if Clojure does employ the same syntax either for macros and functions by design or it's just a remainder of Lisp. I think that a shared syntax for both macros and functions calls is a flaw in the syntax of Lisps, because you can't tell, just by looking at a form, which expressions get

Re: Clojure's syntax design: macros vs functions

2009-03-04 Thread Matt Revelle
On Mar 4, 2009, at 8:03 PM, Elena wrote: I wonder if Clojure does employ the same syntax either for macros and functions by design or it's just a remainder of Lisp. I think that a shared syntax for both macros and functions calls is a flaw in the syntax of Lisps, because you can't tell,

Re: Clojure's syntax design: macros vs functions

2009-03-04 Thread MikeM
I think that a shared syntax for both macros and functions calls is a flaw in the syntax of Lisps, because you can't tell, just by looking at a form, which expressions get evaluated and which don't, at least when you are dealing with side effects. You might want to think about macros such

Re: Clojure's syntax design: macros vs functions

2009-03-04 Thread Stuart Sierra
Hi Elena, I thinks the Lisp convention says something about how to think about Lisp programs. Well-written macros shouldn't require you to think about the fact that they are macros. Instead of thinking about functions calls vs. macro calls, try to think of forms. A form can be a function call