In C++ I can write:
#ifdef DEBUG
cout << "Debugging!" << endl;
Is there any equivalent in Scala?
The conventional idiom is @elidable.
The scaladoc covers your conventional use case:
http://www.scala-lang.org/api/current/scala/annotation/elidable.html
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With