Rich Hickey's slides from jvm lang summit - worth a read?

Jeremie Pelletier jeremiep at gmail.com
Sat Sep 26 09:02:02 PDT 2009


language_fan wrote:
> Fri, 25 Sep 2009 20:17:12 -0400, bearophile thusly wrote:
> 
>> Rich Hickey:
>>
>>> No, I don't. The post is for Clojure users and shows them a relative
>>> comparison they care about, persistent vs transient.< Unless that code
>>> is returning a persistent vector and provides thread isolation, it is
>>> not doing the same job.<
>> Sorry, I didn't mean to offend you in any way. Sometimes I am not gentle
>> enough. I am sorry.
>>
>> You are right that my comparison with D was wrong because the semantics
>> of that Clojure code and data structures is richer.
>>
>> On the other hand a comparison with a simpler/basic implementation (like
>> just a C array) can be quite useful anyway, to know how much you have to
>> pay for such useful extra semantics.
>>
>> I have seen several online benchmarks of many languages, Clojure too.
>> Often they show only numbers for a single language. In such situations a
>> comparison with other languages is useful to put numbers in perspective.
>> So a comparison with (for example) a baseline C program is useful
>> (hopefully with the same semantics, where possible). For Clojure a
>> comparison with Java can be equally useful.
> 
> Often the geniuses behind the best languages are not interested in 
> implementing everything themselves, instead they focus on building a 
> framework for others to build on and specifying the semantics of the 
> language. The skill for designing a good language is a gift, and not 
> everyone has it. On the other hand, if you hand out instructions, even 
> uneducated novice coders from the 3rd world's high schools can implement 
> the best compiler in the world. So fact that the language is fast and can 
> be made faster (if not optimally fast) with more effort, often suffices.

I disagree about it being a gift, someone may just enjoy coming up with 
ideas but not enjoy developing them, that doesn't mean he doesn't have a 
gift for development, he just doesn't enjoy it. What most people see as 
a "gift" I see as just enjoying what you do. Just like when I was in 
music school, I saw people whom everyone thought had no talent, 
something believed to be genetic and a gift, rise up to become much 
better musicians than people who had the "gift". It really just comes 
down to enjoying youself, and that's something anyone can learn.

> This is similar to gotos and higher order functions / dynamic dispatch. 
> The low level language designers focus on optimizing the goto statement 
> on all possible architectures using the fastest sse4 instructions. 
> However, their language does not scale to 500+ LOC programs because it is 
> totally unreadable. Each time they manage to cut off yet another 12 ns 
> from an inner loop, they post the news to reddit and praise their savior 
> who never listens to their ideas. The higher level language designers 
> focus on designing new language theory and complex control and data 
> structures that make the language more usable in the future.

Optimizing goto's using SSE4? Thank god you're not optimizing languages 
:p The balance lies between low level optimizations and high level 
structures. The best way to develop is often to focus on that balance, 
and then come back after profiling to optimize the bottlenecks. If you 
focus on complex structures to make your life simpler only, you will 
make it hell to optimize so you're not winning anything in the end, if 
you focus only on low level optimizations you get code that makes you go 
nuts when you read it back 3 months later and is therefore harder to modify.

Jeremie



More information about the Digitalmars-d mailing list