-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Elvis ?: [enhacement] #28
Comments
It doesn't parse, so I'm guessing it cannot be done. But how about a lady gaga operator |
is that possible? At first I thought it was a joke, but then I saw it as
And I assume somehow $ is a magical variable that doesn't mess with the type system. Mi ignorance about the whole source file -> class file process is almost perfect, so I don't know what can be done in each stage. If it is possible, it is a nice workaround, and while somehow strange, it is way better than
|
Yes, it should be possible if the $ variable is defined in the background On Mon, Jul 13, 2015, 8:44 AM Pablo Grisafi [email protected]
|
Thanks again for your extraordinary work.
You said that adding new operator is difficult because of no extension points at that stage. What about the elvis ?: operator, better known as null coalescing operator ? you know, instead of
String firstName = user == null ? null : user.getFirstName()
i'd like to write
String firstName = user?:getFirstName()
I don't know if that counts as a new operator, since both chars already have a meaning
The text was updated successfully, but these errors were encountered: