[#1263] Draft of the updated Ruby FAQ — Dave Thomas <Dave@...>

33 messages 2000/02/08

[#1376] Re: Scripting versus programming — Andrew Hunt <andy@...>

Conrad writes:

13 messages 2000/02/15

[#1508] Ruby/GTK and the mainloop — Ian Main <imain@...>

17 messages 2000/02/19
[#1544] Re: Ruby/GTK and the mainloop — Yasushi Shoji <yashi@...> 2000/02/23

Hello Ian,

[#1550] Re: Ruby/GTK and the mainloop — Ian Main <imain@...> 2000/02/23

On Wed, Feb 23, 2000 at 02:56:10AM -0500, Yasushi Shoji wrote:

[#1516] Ruby: PLEASE use comp.lang.misc for all Ruby programming/technical questions/discussions!!!! — "Conrad Schneiker" <schneiker@...>

((FYI: This was sent to the Ruby mail list.))

10 messages 2000/02/19

[#1569] Re: Ruby: constructors, new and initialise — Yukihiro Matsumoto <matz@...>

The following message is a courtesy copy of an article

12 messages 2000/02/25

[ruby-talk:01274] Re: Draft of the updated Ruby FAQ

From: Dave Thomas <Dave@...>
Date: 2000-02-09 13:34:07 UTC
List: ruby-talk #1274
Clemens Hintze <clemens.hintze@alcatel.de> writes:

> I think, if it is clarified with matz you should change/correct also
> parts of direct quotes of him. And he seems to agree to change it as
> he has answered in [ruby-talk:01270].

If matz asks I'm more than happy to.

> But then, is it important for the newbie/user to know, that a symbol
> is created? What can I do with a symbol? Better not to mention it
> here? Do not forget I am trying to write from a user's point-of-view.

See the new example.

> I, for example, cannot imagine what you mean by saying
> '(main)'? I know, however, what you mean with 'toplevel' ;-)

That's why I used the two words ;-). However, see the new example.

> The last sentence beginning with 'while, until, and ...' could also be
> attached above the examples. So seeing the examples, I would have
> already read the whole description. I do not like, that a description
> is spread thru many sections. Only if it is a complex one, that would
> be appropiate, IMHO.

I've tried to illustrate each section with its own examples. Do people 
like that, or would you prefer a larger block of text and then a large 
example?

> You have mentioned here three ways! But if I see this 'Proc.new.call'
> thingy I feel you should also mention the 'proc' and 'lambda'
> constructs. Then we have five ways and more examples ;-)

That's not a new way--it's simply an alias. They're already in the
last of the three examples.

> 6.6 What is a singleton class?
> 
> Has all this about 'anonymous classes' to be mentioned here? I feel
> your second example should be called something like 'object
> extension'. That there are used 'anonymous classes' used to do that,
> is regardless for the user/newbie. He even cannot find it simply out,
> as 'anchestors' would not show this 'anonymous class'.

I think it's key to understanding the construct that it creates a new
subclass of the object's class. Otherwise, what's the difference
between this and 'def foo.fff'. That's why the example code makes use
of an instance variable,

Whether or not 'anonymous' adds to the description is a matter of
taste. Personally, it answers a question I would otherwise have had:
"where do you specify the name of this subclass?". However, I'm happy 
to change the wording if others think it's not clear.

Once again, thanks for all your trouble.

There's a new version of the FAQ posted at

        http://www.pragprog.com:8080/rubyfaq 

Regards


Dave

In This Thread