Will lambda expressions become primitive objects?
Glavo
zjx001202 at gmail.com
Wed Oct 6 15:45:39 UTC 2021
Objects created by lambda expressions seem to meet the limitations of
primitive objects. At present, the object created by lambda expression
still seems to be identity object, making them primitive objects may
reduce the creation of unnecessary objects in the absence of inlining.
So I'm curious if you have such plans?
I don't know if a lot of code depends on the object identity of lambda
expressions, If the object identity of a lambda expression cannot be
removed for compatibility, can you consider supporting such a simple
way to create a lambda expression that is a primitive object:
var runnable = (Runnable & PrimitiveObject) () -> {};
More information about the valhalla-dev
mailing list