Re: special forms and let binding

2010-05-31 Thread alux
Hi Аркадий, I started another thread about the difference between special form and macros today - and got told that it is not possible to overwrite a special form. Regards, alux On 31 Mai, 21:15, "Ark. Rost" wrote: > So I don't understand if there any way do it. I'm really curious about > it.

Re: special forms and let binding

2010-05-31 Thread Ark. Rost
So I don't understand if there any way do it. I'm really curious about it. -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient

Re: special forms and let binding

2010-05-31 Thread Аркадий Рост
In fact, keywords are not symbols. So thats why you were wrong. You can read about in on the page http://clojure.org/lisps -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts f

Re: special forms and let binding

2010-05-30 Thread alux
Hello ataggart, thank you for the correction! Only now I understand A.Rosts question. May be somebody can help, and explain why my hypothesis was wrong. Obviousely, while functions are first class, special forms are even "better", kind of zeroth class. Thank you, alux On 31 Mai, 04:15, ataggart

Re: special forms and let binding

2010-05-30 Thread ataggart
On May 30, 12:45 pm, alux wrote: > Hi A., > > I dont completely understand what you refer to with "works correct". > > You define a local variable, named do, and use it.  That works of > course. Btw you may use it without the call to var > (def do println) > (do "example") It only appears to "w

Re: special forms and let binding

2010-05-30 Thread alux
Hi A., I dont completely understand what you refer to with "works correct". You define a local variable, named do, and use it. That works of course. Btw you may use it without the call to var (def do println) (do "example") In let you may do (let [do println] (do :plop)) Is this what you want

Re: special forms

2010-05-20 Thread Rasmus Svensson
I thought I'd just share some thoughts on special forms... 2010/5/20 Konrad Hinsen > You can't redefine special forms. What you define in your examples is the > symbols that serve to identify special forms. But they indicate special > forms only when used in the first position of a list that is

Re: special forms

2010-05-19 Thread Konrad Hinsen
On 20 May 2010, at 08:03, Аркадий Рост wrote: It turned out that special forms are behaving strangely when you try to redefine them. You can't redefine special forms. What you define in your examples is the symbols that serve to identify special forms. But they indicate special forms only

Re: special forms vs. functions and macros

2009-02-03 Thread Jason Wolfe
> There are a very few functions and a few more vars defined only in > Java code, but that participate in namespaces the normal way and > therefore don't count as special forms. > > One way to find these is to get a list of all the clojure.core vars > that have no :file metadata: > (filter #(nil?

Re: special forms vs. functions and macros

2009-02-03 Thread Telman Yusupov
Jason, thanks a lot for the tip on "source" macro in clojure.contrib.repl-utils, it is indeed very nifty! Resolution for the day: get to know the contrib library! On Feb 2, 9:48 pm, Jason Wolfe wrote: > I believe that any non-special-form has a clojure implementation in > some .clj file, althou

Re: special forms vs. functions and macros

2009-02-03 Thread Christophe Grand
Chouser a écrit : > What the remaining vars do is a mystery for all but those willing to > plumb the depths of Clojure's Java sources: > > *macro-meta* > *math-context* > *use-context-classloader* > I can shed some light on one third of this mystery: *math-context* can be bound to an instance o

Re: special forms vs. functions and macros

2009-02-03 Thread Chouser
On Mon, Feb 2, 2009 at 9:28 PM, Mark Volkmann wrote: > > I understand that special forms are all recognized by the Clojure > compiler clojure.lang.Compiler. Is it the case that all function and > macro definitions can be found in some .clj file, whether supplied > with Clojure or not? Asked anoth

Re: special forms vs. functions and macros

2009-02-02 Thread Jason Wolfe
I believe that any non-special-form has a clojure implementation in some .clj file, although that implementation may simply be a wrapper for a method in clojure.lang.RT. Also check out the source macro in clojure.contrib.repl_utils. It's quite nifty: user> (source into) (defn into "Returns a

Re: special forms vs. functions and macros

2009-02-02 Thread David Nolen
I think the special forms list on the Clojure main page lists all the constructs that are not written in Clojure itself. It seems most everything else can be found in the .clj files in the src directory. I'm constantly looking in there when I'm curious how something works or is implemented, espec

Re: Special forms and namespaces

2008-10-27 Thread Stephen Wrobleski
On Mon, Oct 27, 2008 at 07:58:09AM -0700, Tayssir John Gabbour wrote: > Pretty cool; this means that special operators just shadow my attempts > to redefine them. For example: > > user> (defn quote [a b] > (+ a b)) > #'user/quote > user> (quote 1 2) ;; Quote ignores args after the first..

Re: Special forms and namespaces

2008-10-27 Thread Tayssir John Gabbour
Stephen C. Gilardi wrote: > Yes, that's one of the things that's special about them. They are > resolved as special forms independent of the current namespace. > > I'm not sure if it's essential or a design choice that they have no > namespace of their own. Pretty cool; this means that special op

Re: Special forms and namespaces

2008-10-27 Thread Stephen C. Gilardi
On Oct 27, 2008, at 10:15 AM, Tayssir John Gabbour wrote: > Hi, > > I've noticed that symbols naming special forms don't belong to a > namespace. For example: > > user> (map #'namespace [`def `do `if `quote `assoc]) > (nil nil nil nil "clojure") > > Is this expected? Yes, that's one of the thing