Good point about type-hinting.
On Nov 2, 11:42 am, Chouser <[email protected]> wrote:
> On Mon, Nov 2, 2009 at 3:32 PM, ataggart <[email protected]> wrote:
>
> > If (Integer/parseInt "5") works, then not all functions need be an
> > implementation of IFn; or perhaps more precisely, clojure knows when a
> > call is being made to an IFn vs a static java method. It would be
> > nice for consistency if whatever makes that work also treated Integer/
> > parseInt as a function with respect to higher-order functions such as
> > map. Even the naive implementation of just automatically wrapping
> > such uses in an anonymous function would go a long way to removing
> > boiler-plate.
>
> This could be made to work. However, there would be no place to
> put type hints for the arguments to the static method without
> converting your expression to essentially the form currently
> required, #(Integer/parseInt #^String %). It's my understanding
> this is why Rich hasn't implemented this already.
>
> --Chouser
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to [email protected]
Note that posts from new members are moderated - please be patient with your
first post.
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
-~----------~----~----~----~------~----~------~--~---