Re: Curious About Interfaces In IFn.java

2017-11-02 Thread Alex Miller
Yes, primitive ^long and ^double hints can result in calling and returning 
primitives in function invocation to avoid boxing. Otherwise, pretty much 
everything is typed as Object from the JVM's perspective.

On Thursday, November 2, 2017 at 6:11:29 AM UTC-5, Nick Mudge wrote:
>
> I noticed the interface definitions in IFn.java that start out like this:
>
> static public interface L{long invokePrim();}
> static public interface D{double invokePrim();}
> static public interface OL{long invokePrim(Object arg0);}
> static public interface OD{double invokePrim(Object arg0);}
>
> Obviously these are about handing primitive arguments and return values. I 
> am curious what/why they are used. Are these used for performance reasons 
> with primitive values?
>

-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Curious About Interfaces In IFn.java

2017-11-02 Thread Nick Mudge
I noticed the interface definitions in IFn.java that start out like this:

static public interface L{long invokePrim();}
static public interface D{double invokePrim();}
static public interface OL{long invokePrim(Object arg0);}
static public interface OD{double invokePrim(Object arg0);}

Obviously these are about handing primitive arguments and return values. I 
am curious what/why they are used. Are these used for performance reasons 
with primitive values?

-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.