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
A Function/lambda should be able to take a const parameter which is read-only. This will enable certain optimizations and will remove the need to copy references.
This feature will also enable a lot of gains when value-types are actually implemented in Kotlin but, they're not dependent on the availability of value-types in the language. But it's arguable if this feature depends on the availability of const val reference types (heap object that cannot be changed).
Keyword: Kotlin's const keyword can be used so there's no need to add a new one.
The strawman syntax should make it look like the following:
fun foo(const bar: Bar)...
The text was updated successfully, but these errors were encountered:
KEEP issues are intended to be used for discussing specific KEEP proposals. If you want to make a suggestion for adding a feature to Kotlin and aren't ready to write a complete design proposal, please file a YouTrack issue.
A Function/lambda should be able to take a
const
parameter which is read-only. This will enable certain optimizations and will remove the need to copy references.This feature will also enable a lot of gains when value-types are actually implemented in Kotlin but, they're not dependent on the availability of value-types in the language. But it's arguable if this feature depends on the availability of
const val
reference types (heap object that cannot be changed).Keyword: Kotlin's
const
keyword can be used so there's no need to add a new one.The strawman syntax should make it look like the following:
fun foo(const bar: Bar)...
The text was updated successfully, but these errors were encountered: