Pass by reference: final and effectively final parameters and qualifying return types

Suminda Sirinath Salpitikorala Dharmasena sirinath1978m at gmail.com
Tue Jan 5 07:45:55 UTC 2021


Hello,

Java unlike C# does not have `ref` parameters. Reference parameters
contribute to some of the recent speedups as highlighted in this post:
https://devblogs.microsoft.com/dotnet/performance-improvements-in-net-5/.

So is it possible to automatically convert qualifying parameters and return
types in refs.

Final and effectively final parameters and also certain return types can
also be converted into refs.

A language change is not needed as this is done by the compiler/JVM, though
further language change can be done to accommodate this.

Suminda


More information about the valhalla-dev mailing list