4 ms·
Elvis is actually the name in Groovy for the ?: syntax (C# uses ??), not for the ?. syntax. The name "elvis" was promoted by the then-project manager of Groovy
by vorg 11y ago
Elvis is actually the name in Groovy for the ?: syntax (C# uses ??), not for the ?. syntax.
The name "elvis" was promoted by the then-project manager of Groovy in an attempt to change the origin meaning of "G-Strings", the name for interpolated strings in Groovy. It originally alluded to the item of clothing, but in an attempt to sanitize Groovy's image for marketing, he wanted it to have meant the string on Elvis's guitar, so he created an accompanying fun-name for the null coalescing operator.
- Slump 11y agoThat's fair. I come from a C# background and Mads Torgersen himself refers to the C#'s ?. syntax as the Elvis operator see (https://channel9.msdn.com/Events/Build/2015/3-711 https://channel9.msdn.com/Events/Build/2015/3-711) 30:50. It's all in good fun.