?. is the null safe dereference (not .?). ?: is the Elvis operator, so named because it's the start of the Elvis smiley: ?:)
~~ Robert Fischer. Grails Training http://GroovyMag.com/training Smokejumper Consulting http://SmokejumperIT.com Enfranchised Mind Blog http://EnfranchisedMind.com/blog Check out my book, "Grails Persistence with GORM and GSQL"! http://www.smokejumperit.com/redirect.html Hamlet D'Arcy wrote: > It doesn't look like anyone pointed this out yet... but the show and > show notes for #234 refer to .? as the elvis operator, which it is > not. > > .? is the null safe dereference (or null safe member selection or > safe navigation operator). It is not called elvis. > > ?: is the elvis operator, which is a sort of short hand ternary > operator for dealing with nulls. > > Neal Gafter's google doc on the topic does a good job differentiating > between the two: http://docs.google.com/Doc?docid=ddb3zt39_78frdf87dc&hl=en > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "The Java Posse" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/javaposse?hl=en -~----------~----~----~----~------~----~------~--~---
