On Sun, Dec 21, 2008 at 2:27 AM, Jorge Ortiz <jorge.or...@gmail.com> wrote: > >> GABRIEL: But you CANT get the car out of sports mode. Scala is set to >> sports mode out of the box and you can't fix this (another MAJOR >> problem with Scala I tend to harp on about). Stuff like /: and :\ are >> always imported. Unless you want to write a boatload of import >> statements to 'unimport' these, and include that in every single scala >> file you write, you're stuck with those. > > When you use an object, it's methods are available to you. This is > just as true in Java as it is in Scala. How is it a problem? If you > don't like methods with operator names, don't use them. As James > pointed out, that's what coding standards, code reviews, and automated > code checkers are for. You're not "stuck" with them. If you don't want > them, don't use them.
I was involved in a discussion similar to this on another mailing list recently. I don't agree with the argument that it's okay for a language to have lots of syntax features because "if you don't want them, don't use them". The problem is that even if you don't use them, you still have to understand ALL of them because you'll have to read code written by others that do use them. This is true even if your company has standards that preclude them because you'll still need to read code that other people outside your company wrote as you are learning about the language. To give an example from Ruby, here are the methods that tell you if a Hash (a Ruby map) contains a given key: has_key?, key?, include? and member?. These are aliases for each other. The good news is that you can pick the one that sounds best to you. The bad news is that you have to remember that they all do the same thing because others will use a combination of all them. This is TIMTOWDI gone awry! -- R. Mark Volkmann Object Computing, Inc. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "The Java Posse" group. To post to this group, send email to javaposse@googlegroups.com To unsubscribe from this group, send email to javaposse+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/javaposse?hl=en -~----------~----~----~----~------~----~------~--~---