On Dec 21, 8:19 am, "Mark Volkmann" <r.mark.volkm...@gmail.com> wrote: > On Sun, Dec 21, 2008 at 2:27 AM, Jorge Ortiz <jorge.or...@gmail.com> wrote: > ... > 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.
But this is a matter of "choosing your own poison": how many ways do you have to increment a variable in Java? how many ways do you have to select between different options? how many ways do you have to iterate over a list? I believe the ternary operator, post increment, increment-and- assignment, etc, don't look extremely weird to us because we're already familiar with them, otherwise they're as odd as /: I don't think any language can escape TIMTOWDI without getting EXTREMELY restrictive. One interesting thing about Scala is that many oddities like /: are just method names enabled by the syntax and not encoded as a particular case in the core language. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---