Yes, it would work. "==" is a method like any other, and you're overriding it.
You should download the Scala IDE and play with a feature called the "Worksheet".
See here: https://github.com/scala-ide/scala-worksheet/wiki/Getting-St...
You should download the Scala IDE and play with a feature called the "Worksheet".
See here: https://github.com/scala-ide/scala-worksheet/wiki/Getting-St...
Isn't this ability a bit dangerous or worrisome? It means that for every Scala package you use you need to review the code. It does make a good prank though :)
I wouldn't say it was particularly dangerous, but it is a massive pain to deal with (it also means you can google for any help with a particular method).