You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: _posts/2022-00-00-signature-polymorphic-methods.md
+17Lines changed: 17 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -157,6 +157,23 @@ JVM. `MethodHandle` was added to the JVM at the same time as
157
157
> TODO: Is this actually accurate? I suspect it is, but I should
158
158
> dig around and confirm it, and perhaps add links.)
159
159
160
+
> TODO: I should improve the bit about "efficient implementation
161
+
> of lambdas". Adam Vandervorst wrote:
162
+
> > I'm a bit confused by the "Are these methods good for anything else" section
163
+
> > I deduce Java only uses it in "MethodHandle and VarHandle" and Scala just gained the barebones implementation.
164
+
> I replied:
165
+
> That's a good point. I will try to improve that section. In order to improve it properly, I need to dig a little deeper into how MethodHandle and VarHandle are used internally in the Java and Scala compilers.
166
+
> Jason (et al) definitely used MethodHandle when adding lambda support to the compiler back end for Scala 2.12, but I need to dig and see whether we are specifically using the signature polymorphic methods.
167
+
> I don't want to get too deep into it in the blog post itself, but I would like to expand it a bit and need to do a bit more research in order to make the expansion accurate.
168
+
169
+
> TODO: I might rethink how I'm presenting the issue of speed here. As I wrote to
170
+
> Adam:
171
+
> that's kind of what I was getting at with the " If I care so much about performance, surely I should avoid using reflection at all?"
172
+
> if I understand correctly, if you aren't a language implementer, then boxing overhead in reflection is probably the least of your worries
173
+
> but the methods are signature polymorphic regardless
174
+
> so we need the compiler support in Scala in order for the methods to even be callable at all by users who don't care about speed
175
+
> it's a bit tricky to convey this without making the post overlong
0 commit comments