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.
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
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
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
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
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
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
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
> 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?
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
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
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
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
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
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..
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
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
17 matches
Mail list logo