the clojure compiler also does some optimizations for keyword literal
calls on deftypes which you lose if you def it

On Wed, Aug 3, 2011 at 10:29 AM, Laurent PETIT <laurent.pe...@gmail.com> wrote:
> 2011/8/3 Sean Corfield <seancorfi...@gmail.com>
>>
>> On Wed, Aug 3, 2011 at 10:03 AM, Brian Marick <mar...@exampler.com> wrote:
>>>
>>> ** It could mean "there are no nasty surprises here". I vividly remember
>>> debugging a Smalltalk program and discovering what I'd been ignoring as a
>>> simple getter actually had hundreds of lines of code behind it. Using a
>>> keyword as a getter wouldn't have misled me so. (:start voyage) also makes
>>> it clear that the code is fast, whereas (start voyage) allows for anything -
>>> perhaps a leisurely calculation involving database queries.
>>
>> FWIW, that's what I take it to mean. If I see (start voyage) I assume
>> start is a function that "does something" to voyage to return a value. If I
>> see (:start voyage) it conveys both the simple accessor and "voyage is a
>> map-like structure" which is potentially useful in understanding the code
>> (without that hint, voyage is some opaque data structure).
>
> I would not rely "too much" on that : when associativity is done as a
> protocol in a future version, voyage could then be of a type defined by
> deftype which may involve database queries ...
>
>>
>> --
>> Sean A Corfield -- (904) 302-SEAN
>> An Architect's View -- http://corfield.org/
>> World Singles, LLC. -- http://worldsingles.com/
>> Railo Technologies, Inc. -- http://www.getrailo.com/
>>
>> "Perfection is the enemy of the good."
>> -- Gustave Flaubert, French realist novelist (1821-1880)
>>
>> --
>> 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 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



-- 
And what is good, Phaedrus,
And what is not good—
Need we ask anyone to tell us these things?

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