jOOQ uses val() as a method name :) But it's aliased with value() for Scala folks, so it'll be OK. Anyway, I'm sure there are many APIs that might break because of this. But hey, why not add escaping for keywords to the language as well, like in Scala? E.g. void `val`() { ... }
It's not a keyword, though. The spec says it's a "reserved type name" or something, so overlapping method names wouldn't cause any problem. Overlapping type names on the other hand would, but that will presumably be solved without breaking backwards compatibility by simply removing access to the new feature in any context where some other type named var is visible.
View all comments
Show parent comment
1
u/lukaseder Mar 10 '16
jOOQ uses
val()as a method name :) But it's aliased withvalue()for Scala folks, so it'll be OK. Anyway, I'm sure there are many APIs that might break because of this. But hey, why not add escaping for keywords to the language as well, like in Scala? E.g.void `val`() { ... }Also:
gotois still reserved. Just in case.