From: dblack@... Date: 2002-09-10T22:35:24+09:00 Subject: Re: Ruby aesthetics Hi -- On Tue, 10 Sep 2002, William Djaja Tjokroaminata wrote: > Hi, > > Taking "if" and "unless" as the example, the point to be made is that I > think we can make a judgment whether "unless" really contributes to the > expressiveness of a programming language, independent of whether it is a > built-in keyword in the language itself or not. > > If we say yes, then in Ruby we will use both "if" and "unless", but then > because "unless" is so useful, when we code in C, we are supposed to > define the "unless macro" and make good use of both "if" and "unless". Does it have to be all-or-nothing? Meaning: I don't think it's a question of coming up with a list of inherently "expressive" words and then putting them into every existing programming language. Expressiveness has to do with what's going on around the word, too, not just the word itself. For example, I like the: statement unless condition idiom, at least for short statements and conditions, at least in some cases. I'm glad it exists in Ruby, and it's actually the place where I'm most likely to use "unless". But putting "unless" in C, via a macro, does not mean that C can do what this idiom does, by way of expressiveness (in my opinion). [...] > (Oh, no, I am not really proposing to remove "unless" from Ruby, or > to really add the "unless macro" in C. Suppose we are to design a > new language; then one of the questions to be answered will be, is > it advantageous to be minimalist in keywords? Do we really want > both "if" and "unless"?) Doesn't it depend on the characteristics of the whole system of which, say, "unless" is (or is not) a part? I guess you could start out with a policy... but I'm not sure what the advantage of that would be. It strikes me a little bit like writing a symphony and deciding in advance whether or not the clarinets will ever play a D#. Then again, I'm not a language designer (or a composer :-) David -- David Alan Black | Register for RubyConf 2002! home: dblack@candle.superlink.net | November 1-3 work: blackdav@shu.edu | Seattle, WA, USA Web: http://pirate.shu.edu/~blackdav | http://www.rubyconf.com