[#3006] mismatched quotation — "stevan apter" <apter@...>

ruby documentation uses a punctuation convention i've never seen

13 messages 2000/05/27

[ruby-talk:02954] Re: Things I am wondering...

From: "David Douthitt" <DDouthitt@...>
Date: 2000-05-23 16:49:55 UTC
List: ruby-talk #2954
>>> matz@netlab.co.jp 5/23/00 10:56a >>>

>In message "[ruby-talk:02948] Things I am wondering..."
> on 00/05/23, h.fulton@att.net <h.fulton@att.net> writes:
>
>|1. Why is Dir::foreach not named Dir::each? 
>
>`each' is reserved for default enumeration.

What is "default enumeration"?

>|3. Why are TrueClass and FalseClass separate classes?
>|In a way, I see the logic of it. But my instinct would
>|have been a single class called Boolean.
>
>I don't think true and false ever share the implementation, thus
>there's little reason to have common single boolean class. Having
>Boolean class as common ancestor of True and False may be helpful to
>classify boolean values.

I could see wanting to expand Boolean, and having True and False there would be nice.

I'm always having to say (though normally without "return" in a definition):

   return ((foo =~ /pat/) != nil)

Perfect for an expansion to class Boolean....

>|5. Like many other languages, Ruby does short-circuiting
>|of Boolean expressions. Other than efficiency, what is
>the rationale for this? Was the other way (full 
>evaluation) ever considered?
>
>hey are designed so because I was C tainted programmer. They are
>ffective too. I haven't considered other way; I dislike Pascal.

To flip-flop the question: what is the rationale for "and" "or" et al?  Isn't "&&" and "||" enough? :-)

Thanks for the hard and dedicated work you put in on Ruby!


In This Thread

Prev Next