It has been a long time....

It seems that now, static-fns true work fine also for special cases like REPL 
development.

David, do you agree?

Take a look here: 
http://app.klipse.tech/?cljs_in=(def%20x%20(fn%20%5Ba%20b%5D%20(%2B%20a%20b)))%0A%0A(def%20y%20(fn%20%5B%5D%20(x%201%202)))%0A%0A%0A(def%20x%20(reify%20IFn%20(-invoke%20%5B_%20a%20b%5D%20(-%20a%20b))))%0A%0A(y)%0A%0A%0A(binding%20%5Bx%20(fn%20%5B%26%20args%5D%20(apply%20-%20args))%5D%0A%20%20(y))&static-fns=true





On Thursday, 15 August 2013 19:46:35 UTC+3, Thomas Heller  wrote:
> Ah, makes sense.
> 
> Thanks!
> 
> /thomas
> 
> On Thursday, August 15, 2013 3:44:24 PM UTC+2, David Nolen wrote:
> > It's an option mostly because of REPL development to allow for 
> > redefinition. For example if :static-fns true we statically dispatch to 
> > specific fn arities - but what if you redef to a different set of arities? 
> > What if you change the var to store a deftype instance that implements IFn. 
> > That kind of thing.
> > 
> > 
> > 
> > So for compilation :static-fns can nearly always be true, but for the REPL 
> > it's not desirable.
> > 
> > 
> > 
> > 
> > David
> > 
> > 
> > 
> > 
> > On Thu, Aug 15, 2013 at 6:22 AM, Thomas Heller <[email protected]> wrote:
> > 
> > Hey,
> > 
> > 
> > 
> > quick question: Why does *cljs-static-fns* exist and what are its drawbacks 
> > when true?
> > 
> > 
> > 
> > I know its
> > 
> > 
> > 
> > my_fn.call(null, args...)
> > 
> > 
> > 
> > vs.
> > 
> > 
> > 
> > my_fn(args...)
> > 
> > 
> > 
> > but I have not yet figured out why it shouldn't be true? My code seems to 
> > work fine but maybe someone can point me towards potential issues?
> > 
> > 
> > 
> > Regards,
> > 
> > /thomas
> > 
> > 
> > 
> > --
> > 
> > Note that posts from new members are moderated - please be patient with 
> > your first post.
> > 
> > ---
> > 
> > You received this message because you are subscribed to the Google Groups 
> > "ClojureScript" group.
> > 
> > To unsubscribe from this group and stop receiving emails from it, send an 
> > email to [email protected].
> > 
> > To post to this group, send email to [email protected].
> > 
> > Visit this group at http://groups.google.com/group/clojurescript.

-- 
Note that posts from new members are moderated - please be patient with your 
first post.
--- 
You received this message because you are subscribed to the Google Groups 
"ClojureScript" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/clojurescript.

Reply via email to