4 ms·
>I think the prime reason for this is that scala permits operator overloading; more than that, in fact, almost every character can be an identifier. I've been
by tsotha 15y ago
>I think the prime reason for this is that scala permits operator overloading; more than that, in fact, almost every character can be an identifier.
I've been toying with the idea of trying scala for a serious project for a few months, and this part scares me. It's so obviously a bad idea it makes me wonder what other dumb things are in there.
- soc88 15y agoScala doesn't permit operator overloading, it doesn't even have operators.
- tsotha 15y agoWell, that's true, technically. But can't you name your functions things like "++"?
- soc88 15y agoYes. Because Scala doesn't make up random rules about how you name your methods. If you name your method addAll or ++ is pretty much the same. The same rules apply to both. Both can be called the same way: coll1.addAll(coll2) coll1.++(coll2) coll1 addAll coll2 coll1 ++ coll2
- tsotha 15y agoThose "random rules" make the code base much easier to read. This kind of thing is a big step backwards for people working on large projects, especially people who need to come up to speed on a large code base.