--Y46ssxGX9/CNNfN6
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

Simon Kitching (simon / ecnetwork.co.nz) wrote:

> > > (c) how invoke "hidden" methods?
> > 
> > Simply send the message a method invocation would produce yourself:
> > 
> > irb(main):003:0> 5.send(:rand)
> > => 0.748920713318512
> 
> Whoa! So private methods can be called after all???!
> 
> Not the end of the world, I guess. After all, Python doesn't support
> private methods at all, right? Still a bit odd in my opinion.
>
> Is there any reason why Ruby allows private methods to be invoked like
> this? (rather than provide a tidy alternative for problems like mine).

I believe I'm giving a fairly accurate paraphrase of matz when I say
that Ruby doesn't prevent you from writing sloppy code, it just makes it
look ugly enough so that you don't do it.

Scary things tend to look scary in Ruby.
Evil things tend to look evil in Ruby.

-- 
Eric Hodel - drbrain / segment7.net - http://segment7.net
All messages signed with fingerprint:
FEC2 57F1 D465 EB15 5D6E  7C11 332A 551C 796C 9F04


--Y46ssxGX9/CNNfN6
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (FreeBSD)

iD8DBQE/jdiEMypVHHlsnwQRAtdxAKDERec4ZwpSgFymVIij+yiDJlLrbQCgtFiW
B5EVDSLj/Ur4zC2z9mRwm8EC
-----END PGP SIGNATURE-----

--Y46ssxGX9/CNNfN6--