On Aug 11, 2:43 pm, fft1976 <fft1...@gmail.com> wrote:
> On Aug 11, 4:50 am, Jonathan Smith <jonathansmith...@gmail.com> wrote:
>
> > I don't think you have to put *everything* in the let, just your
> > constants. (so days per year and solar mass, the bodies themselves).
>
> How will they "escape" from the LET though? I see that in your code
> everything is inside a LET. That's what I tried.
>

I don't think I quite understand what you mean by 'escape'? I mean,
generally speaking they get captured in the environment of the more
inner form (i.e. main has everything in its environment).

You could just as easily use something like defn- to regulate external/
internal-ness, I just happened to feel like using let in this
situation.

I think java has to do different stuff depending on whether something
is public or private. I think private is faster... I'm not a java guru
tho.

> By the way, solar-mass, days-per-year, init-bodies only get accessed
> once in my code. No point in optimizing that.
>

No i guess not. I used it in a couple of places I thought. Has been a
while since i looked at the code. :-)

> > > Your version is not pure-functional, right? If so, I think I still
> > > have the fastest pure-functional and non-type declaring version.
>
> > Ok, sure.
>
> Yes! Touchdown.

Woo!
And you can make it faster yet! :-)
--~--~---------~--~----~------------~-------~--~----~
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 with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to