On Wed, Nov 13, 2013 at 1:39 PM, gvim <gvimrc / gmail.com> wrote:

I'm beginning to see Ruby's "everything is an object" as a serious barrier
> to comprehension, epsecially when this object-orientation is dressed up in
> procedural syntax. Perl seems a lot more natural by comparison.


Ruby has a simpler model than Perl in this regard. It is easier in that
sense, but coming from Perl you need to adjust.

In Perl you have values (scalars, arrays, hashes, ...), and references to
values (which are in turn scalars). In Ruby you only have references.

That's the whole story.

In Ruby

    s = "foo"
    t = s

    s << 'bar'
    puts t

prints "foobar". Everything are references, s holds a reference to a
string, t hods the same reference, therefore in-place mutations are seen in
both of them.