Re: comments from an experienced programmer on ruby docs

Roger Pack <[email protected]> Mon, 2 Aug 2010 16:51:25 -0600
Newsgroups gmane.comp.lang.ruby.documentation
Message-ID <[email protected]>
Might suggest adding info to the ruby wikibook:

http://en.wikibooks.org/wiki/Ruby_Programming


On Wed, Jul 28, 2010 at 12:41 PM,  <[email protected]> w=
rote:
>
> Hey there, I am learning ruby for my hard drive backup project:
>
> http://www.subspacefield.org/security/hdb/
>
> Ruby is a cool language, but the documentation is a little hard to
> read. =A0Many people use the term "Foo#whatever" with the assumption
> that one knows what it means - I originally assumed it was an instance
> method, but now believe it is a class method. =A0Since it's a special
> character, you can't really search google for it easily.
>
> Regarding http://rubylearning.com/: the formatting of the text boxes
> is awful, since at least on my computer, it requires manually scrolling
> every one, effectively peering at the program through a tiny viewport.
> The content, however, is very good.
>
> One thing that needs discussion is how everything except ints and
> floats (and perhaps some other types) are passed by reference. =A0I got
> really bit by passing strings into constructors, and the constructor
> later modified the string, and that changed the value of the thing I
> passed in. =A0This is true for arrays as well, and any user-defined
> objects. =A0Since this is a change from how many other scripting
> languages work, you should point it out a little better (it is hinted
> at). =A0In essence, you'll want to dup any parameter before modifying it
> (unless again it is an integer or float). =A0I assume these are the
> objects that correspond to "what fits in a register" in C. =A0I make it
> a practice to dup everything that gets passed into a constructor. =A0In
> any case, this is a lot closer to C than I expected.
>
> Regarding:
>
> http://www.ruby-lang.org/en/documentation/ruby-from-other-languages/to-ru=
by-from-python/
>
> * The notions of equality (=3D=3D vs eql?) differ from that of python.
> * The keyword parameter stuff can be moved from the higher level page to =
this one,
> =A0since it's targeted at python programmers.
>
> Generally:
>
> You should show how to delegate a method generically. =A0In other words,
> "I don't know how the delegatee will implement this, how the caller
> will invoke it, or whatever - I just want to pass calls to method blah
> through"
> --
> A Weapon of Mass Construction
> My emails do not have attachments; it's a digital signature that your mai=
l
> program doesn't understand. | http://www.subspacefield.org/~travis/
> If you are a spammer, please email [email protected] to get blacklis=
ted.
>