Allow emojis to be used as variable names

It would be cool if this was implemented i think

1 Like
val `foo😀` = 15

It works. But why do you want to do this? :cry:

3 Likes

You can already use (I think) most unicode characters in backticks. Btw, even with characters that are illegal on the JVM (like “<” and “>” and others) you can do

@Suppress("INVALID_CHARACTERS")
@JvmName("validJvmName")
fun `Illegal <`(param: Any) {}
1 Like

this is great, thanks, though i think it would be better if there was a way to not make the end user type the backticks and the backticks would be taken care of behind the scenes

2 Likes

Yes I would love if Kotlin had the feature as well.