From: William Djaja Tjokroaminata Date: 2002-09-06T22:50:59+09:00 Subject: Re: Ruby aesthetics Hi Matz, I prefer the minimalist way because it reduces the programmer's mind burden (less keywords to remember) and it makes codes more consistent. I look at C, and it has done well with just "if" without "unless". In Ruby, just to make myself familiar and comfortable with the language, everytime I have negative condition, I also write "unless" instead of "if !". But if I had a choice, I will eliminate "unless" and provide only "if". In Python, when I look at a code, if the beginning of a block is "if", I know exactly that it is a conditional block; nothing else will give me a conditional block. In Ruby, I have to read until the end of the statement to see if there is some statement modifier there before I know whether the statement is conditional or not. When I am referring to "minimalism", I don't mean minimalism in terms of functionality; I just mean "minimalism" in terms of the non-existency of "equivalence". For example, in Ruby a block can be written as "do...end" or "{...}". In my personal opinion, Ruby will do just fine with one of them (probably the "do...end" to be consistent with the rest, while the "{...}" can be used for some other, different, language construct). I think this is one of the frequently asked questions of newcomers to Ruby, which form is preferred. We know the answer, and we know there is a precedence difference. But to be honest, I never use that precedence difference for my programming advantage. I also only use "&&" and never use "and", just because "&&" has the same precedence as in the C language. When I need different precedence, I just use parentheses. The danger of using "and" in place of "&&" is that when we use 2 languages such as Ruby and C, we have to always keep in mind that Ruby's "and" is not the same as C's (and Ruby's) "&&"; otherwise this may bite someday. In a previous response you wrote that you also like Python. May I know which features of Python that you like? Regards, Bill =========================================================================== Yukihiro Matsumoto wrote: > Why do you prefer minimalist way? I prefer flexibility, > expressiveness, and succinctness to minimalism. I'm sure you don't > have any problem with "unless" once you've told. > matz.