On 11/21/11 7:50 AM, Ralph wrote:
I want to propose that Clojure libraries should be fully "type-hinted"
-- that is, they should be compiled with the "*warn-on-reflection*"
option turned on and type hints place wherever possible.
I understand the argument against type-hinting end-user code until a
performance problem is demonstrated, and then only adding the hints
where needed to fix the performance problems.
Library writers, however, should add them wherever possible. The
library writer has no way of knowing if his/her library will be used
in a time-critical part of the application.
If the application writer has to modify each library to add these type
hints, long-term maintenance will be a nightmare. With each release of
the library, the developer will have to re-check the performance and
fix the library source code to add these hints.
Am I way off base?
I fully agree. As users it would make our jobs much easier and I don't
see any long term drawbacks on the side of the library maintainer to do
this. We've had to fork contrib a number of times to add type hints or
abandon the contrib library for a faster alternative (e.g. json in
contrib, lazy-xml, condition). JSON in contrib has been fixed now I
believe, but I think lazy-xml still has issues, and Condition has never
been fixed (even though I submitted a patch over a year ago[1]).
-Ben
1. http://dev.clojure.org/jira/browse/CONTRIB-103
--
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