Scala FAQ: Can you use a question mark to end a Scala method name?
Answer: Yes, you can. Just use an underscore character before the question mark. For instance, here’s a method named
def alive_? = true
Another possible approach you can use is to use backtick characters around the method name, without using an underscore...