[PJUG Javamail] great presentation last night
Howard Abrams
howard.abrams at gmail.com
Wed Jan 21 17:26:43 EST 2009
I agree with that assessment, Howard did a great job, and it was all
very entertaining and illuminating. I for one, love learning new
languages. However, as was pointed out last night, I seldom risk the
maintenance associated with introducing something vastly different.
One perspective: During college, I spent a couple of years deeply
involved with Lisp after many years working in C, and I found Lisp
baffling and unreadable. However, it didn't take long to get the hang
of it. So, any time you encounter something new, don't sell yourself
short. Of course, I can't make heads or tails out of some Perl scripts
I wrote last year, so there you go...
Concerning supporting someone's code written in Clojure vs. Java: you
still need to mentally parse through the code. And if something can be
done in 2 lines of dense Clojure vs. 20 lines of Java, sometimes it
may be quicker to parse the 2 line even if you aren't as familiar with
the syntax. I run across this all the time using Groovy (which is more
succinct than Java).
Last thought... I first ran across the transactional memory in a
Haskell presentation, and was intrigued. Of course, most of us depend
on transactional support in our databases (which also gives us
persistence). However, I wondered if we couldn't just write a library
to implement a flexible type that could hold data and handle changes
to it transactionally. Something like:
STM stm = STM.getInstance();
stm.startTransaction();
float checking = stm.get('checking');
float savings = stm.get('savings');
stm.put ('checking', checking - amount );
stm.put ('savings', savings + amount );
stm.endTransaction();
However, that is quite a bit of extra code that something like Clojure
could with less verbosity.
Hrm... just looking at that Java code makes me thinking how much less
code (and more clarifying) I could make it if I used a Groovy builder
and closures...
Anyway, Sun has been working on putting transactional memory into the
JVM:
http://video.google.com/videoplay?docid=4575567975642725150
Also, it looks like someone is making transactional memory as a
library for Java:
http://web.ist.utl.pt/~joao.cachopo/jvstm/
On Jan 21, 2009, at 9:11 AM, Benjamin Berman wrote:
> Just wanted to thank Howard for the great presentation on Clojure last
> night. While I disagree that Clojure is easy on the eyes compared to
> Java, I like the idea of software transactional memory-- much more
> elegant than Java concurrency support.
>
> Regards,
> Benjamin Berman
> _______________________________________________
> Web Site - http://www.pjug.org/
> Javamail mailing list
> Javamail at pjug.org
> http://www.pjug.org/mailman/listinfo/javamail
More information about the Javamail
mailing list