Open
Description
The lambda encoding hoists these automatically:
scala> def foo = (_: Any).toString
foo: Any => String
scala> foo eq foo
res0: Boolean = true
scala> def bar = (_: Any).toString
bar: Any => String
scala> bar eq bar
res1: Boolean = true
scala> bar eq foo
res2: Boolean = false
Inlining these will likely result in more readable code. There will be a small cost (creation of the anonfun
methods at each place that defines a "copy" of the same lambda), although we could and should eliminate that with #102
Metadata
Metadata
Assignees
Labels
No labels