(proclaim (speed 3) (safety 0))

is verbose? Telling the compiler in one place that you care
about boxing speed, such as (declare (x unboxed)) seems to
me to be a very direct way to tell the compiler to choose
+' vs + everywhere that 'x' occurs.

This means that "it just works" code does not need additional
unboxing overhead. It also means that "make it fast" code is
marked in a single place.

And the form can be dynamically computed so you can adapt to
the platform.

It has the additional factor that common lispers will "get it".

I understand that it does not fit with your current model of
using inline typing. For a pervasive change like fast numerics
the inline typing or library-based typing is, to my mind, a bit
more cumbersome than 'proclaim' and 'declare' but that's probably
because of my common lisp background. Type hinting feels to me
like using symbol-property machinery in common lisp.

In any case, keep up the good work. I'm impressed with Clojure.

Tim Daly

Rich Hickey wrote:

On Jun 19, 2010, at 2:50 AM, Tim Daly wrote:

Is it possible to follow the Common Lisp convention
of proclaim/declaim/declare in order to specify types?


It would be possible of course, but undesirable. We're trying to avoid that kind of verbosity.

Rich


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