Re: declare and def

2014-03-14 Thread Plínio Balduino
Excellent explanation. Thank you everybody. Plínio On Thu, Mar 13, 2014 at 12:54 PM, Andy Fingerhut wrote: > The Clojure lint tool Eastwood (https://github.com/jonase/eastwood) uses > this {:declared true} metadata to distinguish between a declare followed > later by a def on the same var (no

Re: declare and def

2014-03-13 Thread Andy Fingerhut
The Clojure lint tool Eastwood (https://github.com/jonase/eastwood) uses this {:declared true} metadata to distinguish between a declare followed later by a def on the same var (no warning) from a def followed later by another def on the same var (when it issues a warning). declare is also an expl

Re: declare and def

2014-03-13 Thread Ambrose Bonnaire-Sergeant
Wasn't aware of that. Looks like it's being used here https://github.com/clojure/clojure/blob/master/src/jvm/clojure/lang/Compiler.java#L401 Thanks, Ambrose On Thu, Mar 13, 2014 at 10:14 PM, Gal Dolber wrote: > #'declare adds extra meta to the var {:declared true} > > I don't think it's bein

Re: declare and def

2014-03-13 Thread Gal Dolber
#'declare adds extra meta to the var {:declared true} I don't think it's being used right now, but it can be specially handled by the compiler, for example, to ignore the #'declare stataments from the emitted bytecode, I'm experimenting with this here: https://github.com/galdolber/clojurefast/com

Re: declare and def

2014-03-13 Thread Ambrose Bonnaire-Sergeant
No difference, but declare can take multiple vars as arguments. Thanks, Ambrose On Thu, Mar 13, 2014 at 9:51 PM, Plínio Balduino wrote: > Hi there > > Is there any difference between declare and def when I'm making a forward > declaration? > > Thanks > > Plínio > > -- > You received this messag