From: "David A. Black" Date: 2004-08-19T21:50:19+09:00 Subject: Coming from Ruby (was: Re: When to use parentheses around method args?) Hi -- On Thu, 19 Aug 2004, Richard Dale wrote: > But thanks everyone for the comments - I think I need to read more of other > people's ruby code and then judge which style I prefer. If you have a > smalltalk background like Martin Fowler, I suppose the brackets must just > look like noise. It's time for us to break the cycle and declare ourselves to have Ruby backgrounds. As much as we love Ruby, the community suffers from an inferiority complex: people are constantly doing this or that, or asking that such-and-such be added to Ruby, because of what is done in other languages. Yes, Ruby is a modern, combinative language with all sorts of roots in other languages. But it is not a pastiche; it's a real language, with a non-trivial userbase and non-negligible history of usage. Richard, I certainly don't mean to jump down your throat. For some reason the spirit happens to move me at this moment to comment on this in some depth. I've spent almost four years listening to people talk about "coming from Java" and "being used to Perl" and so on, as rationales for both unconventional stylistic practices and language change requests. Sticking just to the former for the moment: I believe that Matz and his colleagues came up with something really elegant-looking and consistent as they developed traditional Ruby style. I think it's a pity to take the style apart and reassemble it based on isolated decisions about small subsets of it -- especially when those decisions are made on the basis of practices and conventions from other languages. Nor do I mean that things would be better if Ruby programmers started suggesting that Java drop the {}'s around function definitions because it would make people coming from Ruby feel more at home. That would just be more of the same, in the opposite direction. I don't think Ruby should assert or impose itself like that. What I'd like to see, rather, is for Ruby to stop being singled out -- by Rubyists -- as *less* coherent and entitled to its own style and idioms than other languages. This is, I should add, completely orthoganal to the question of Ruby community citizenship and productivity. A number of people who have contributed vastly more code than I have to the Ruby world use camelCase method names, def's without parentheses, and all the rest of it, and I would not buy stylistic uniformity with a single line of their code. I mean exactly, and only, what I say: it's a pity to have a beautiful, unifying traditional style and not use it. David (who "comes from" Ruby :-) -- David A. Black dblack@wobblini.net