It is frequent in my practice that a variable/argument is to store a type of something (as an enumeration value usually). And it usually makes no sense to specify an entity class in the name (like userType when a function is onlu intended to handle users). Is there a way I can use the "type" word for my needs instead of using scaffolds like "tipe", "kind", "somethingType" instead of it? The actual Scala type
keyword is of such a rare use - it would be nice If I could undefine it (as a keyword) in the most of my code files.
You can escape with backticks:
val `type` = 5
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