On Tue, 28 Dec 2010 22:28:54 -0800
Mark Engelberg <mark.engelb...@gmail.com> wrote:

[Standing on soapbox]

> On Tue, Dec 28, 2010 at 10:15 PM, David Nolen <dnolen.li...@gmail.com> wrote:
> > Even in in a single threaded context raw insert performance isn't the final
> > word. What if you want to be able to deliver a snapshot for reporting?
> 
> What if you don't?
> 
> Seriously, I agree with you that Clojure's data structures have some
> significant advantages -- if you need those advantages.  There are
> still plenty of apps that use hash tables in a single-threaded manner,
> or use them in a multithreaded way where contention is unlikely and
> persistence is unnecessary.  In many areas, Clojure has a
> pay-for-what-you-need philosophy -- this just isn't one of those
> areas.  With respect to data structures, Clojure is very opinionated,
> with an attitude of "Write it with immutable data structures -- you'll
> thank me later." :) 

And you'll do that because some things are hard enough that letting
the programmer do it themselves - or decide when they need the help -
often results in the programmer doing it wrong. I mean - you don't
*need* garbage collection for everything: you can allocate and free
things by hand, or even use a "voluntary" garbage collector and mix
those two approaches. Historically, those things don't work very well,
and most of the world has gone to doing GC by default for
everything. There are still cases where you need to free resources by
hand, but those tend to be obvious and can either be hooked into the
GC system (so you free them just before the GC system frees some
containing object) or easy to free properly.

Letting programmers lock/unlock shared structures is very similar
operation to allocating/freeing data structures, and (from my point of
view, anyway) historically hasn't worked very well (I've found dozens
of windows/hanging locks/etc. in large systems that had been in
*production* for years!). Going to "immutable by default" for
everything is the same as going to "gc by default" for everything -
complete with tools for dealing with the exceptions when they arise.

Such systems are still relatively new, and we're still working out the
best way to deal with things. Maybe it'll turn out there's some
compromise short of what Clojure does that actually works well. But I
don't think we'll know what "well" is unless something tackles doing
it full-bore the way clojure does.

   <mike
-- 
Mike Meyer <m...@mired.org>             http://www.mired.org/consulting.html
Independent Network/Unix/Perforce consultant, email for more information.

O< ascii ribbon campaign - stop html mail - www.asciiribbon.org

-- 
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