Skip to content

Commit 29f16db

Browse files
committed
add some notes for later
1 parent 08f0d4f commit 29f16db

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

_posts/2022-00-00-signature-polymorphic-methods.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,23 @@ JVM. `MethodHandle` was added to the JVM at the same time as
157157
> TODO: Is this actually accurate? I suspect it is, but I should
158158
> dig around and confirm it, and perhaps add links.)
159159
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
176+
160177
## How is this implemented in Scala 2?
161178

162179
> TODO -- keep it brief

0 commit comments

Comments
 (0)