Well said Niels. As far as performance optimization. Imo that's premature until you profile.
On Tue, Oct 22, 2013 at 2:42 AM, Niels van Klaveren < niels.vanklave...@gmail.com> wrote: > I can imagine this behavior. Unlike premature performance optimization, > readability / terseness are well worth optimizing for when learning > Clojure, as long as you value readability over terseness to keep well away > from code golf territory. > > With Clojure, I always have the idea that things could be done in a > simpler way, and usually it can. A lot of what I consider 'draft' code that > works can be cleaned up drastically, and sometimes after cleaning I still > have some niggles. However, with time my 'draft' code tends to get cleaner > and cleaner, and I also see up front where algorithms and function input / > output can be changed to prevent code getting needlessly complex, and > having to handle more exceptions than rules. > > While doing 4clojure problems, some of my first attempts were 4 or 5 > lines. While this is considered next nothing in Javaland, getting them down > to 1 line, and comparing them to some of the Clojure vets you get a good > feel for what's the idiomatic Clojure way to solve certain problems. So I > guess it's all part of the learning process. I would not worry about it too > much, you can only clean up for readability / terseness up to a point. > > Be sure to stay away from performance optimization unless absolutely > necessary. There's way too many options, and it needs a really good insight > into Clojure's implementation details to do effectively. Most idiomatic > Clojure code performs on par or better compared to other dynamic languages > like Python and Ruby. > > > On Saturday, October 19, 2013 1:20:33 AM UTC+2, queshaw wrote: >> >> With clojure in particular, I am having trouble not rearranging my code >> to be what I think is more optimal in ways that seem probably not >> practical. I've noticed myself doing that when I'm newish to languages >> and apis. But, I go bonkers with clojure. >> >> Do you have any thoughts about how to avoid that, other than Bob >> Newhart's advice: >> >> http://www.youtube.com/watch?**v=Ow0lr63y4Mw<http://www.youtube.com/watch?v=Ow0lr63y4Mw> >> >> Kendall >> >> -- > -- > 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 > --- > You received this message because you are subscribed to the Google Groups > "Clojure" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to clojure+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/groups/opt_out. > -- -- 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 --- You received this message because you are subscribed to the Google Groups "Clojure" group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.