Re: Slash mystery

2009-03-19 Thread Luc Prefontaine
Why not have two behaviours from the same code base ? There could be a "strict" mode versus an optimized mode. That could allow more optimizations at run time while having a clear trace in the code of these optimizations. The strict mode would be slower but that should be fine when testing. Going

Re: Slash mystery

2009-03-19 Thread Stephen C. Gilardi
On Mar 19, 2009, at 11:33 AM, Michael Wood wrote: Fair enough, but why does the (defn) succeed if these symbols are reserved? Clojure does not always enforce all the rules. It may come to pass that Clojure will never enforce all the rules as the performance cost and complexity added by d

Re: Slash mystery

2009-03-19 Thread Michael Wood
On Wed, Mar 18, 2009 at 10:31 PM, Kevin Downey wrote: > > Symbols starting and ending with "." are reserved. > see http://clojure.org/reader the section on Symbols Fair enough, but why does the (defn) succeed if these symbols are reserved? > On Wed, Mar 18, 2009 at 12:58 PM, Michael Wood wrote

Re: Slash mystery

2009-03-19 Thread Konrad Hinsen
On 18.03.2009, at 19:03, Konrad Hinsen wrote: > Why is user// an invalid token, whereas clojure.core// works > perfectly well? I found out in the meantime that clojure.core// is indeed handled as a special case by the reader (line 276 in LispReader.java), but that still doesn't answer the qu

Re: Slash mystery

2009-03-18 Thread Kevin Downey
Symbols starting and ending with "." are reserved. see http://clojure.org/reader the section on Symbols On Wed, Mar 18, 2009 at 12:58 PM, Michael Wood wrote: > > On Wed, Mar 18, 2009 at 8:22 PM, Kevin Downey wrote: >> >> this came up on irc starting: >> http://clojure-log.n01se.net/date/2009-02

Re: Slash mystery

2009-03-18 Thread Michael Wood
On Wed, Mar 18, 2009 at 8:22 PM, Kevin Downey wrote: > > this came up on irc starting: > http://clojure-log.n01se.net/date/2009-02-18.html#23:49 > and the solution: > http://clojure-log.n01se.net/date/2009-02-19.html#0:30 Interesting. I noticed something similar the other day: user=> (defn ...

Re: Slash mystery

2009-03-18 Thread Kevin Downey
this came up on irc starting: http://clojure-log.n01se.net/date/2009-02-18.html#23:49 and the solution: http://clojure-log.n01se.net/date/2009-02-19.html#0:30 On Wed, Mar 18, 2009 at 11:03 AM, Konrad Hinsen wrote: > > Consider the following session: > > user=> / > # > user=> clojure.core// > #

Slash mystery

2009-03-18 Thread Konrad Hinsen
Consider the following session: user=> / # user=> clojure.core// # user=> (ns-unmap *ns* '/) nil user=> / java.lang.Exception: Unable to resolve symbol: / in this context (NO_SOURCE_FILE:0) user=> (defn / [a b] (clojure.core// a b)) #'user// user=> / # user=> user// java.lang.Exception: Invalid