From: David Vallner Date: 2006-11-12T05:06:12+09:00 Subject: Re: McGovern Likes JRuby... --------------enigD73F3AE29041EDDF9969F0AA Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Charles Oliver Nutter wrote: > Joel VanderWerf wrote: >> James McGovern blogged: >>> Type safety >> >> Whuh? Ruby's not type safe? >> >=20 > Yeah, and exactly how does running on Java help that? Maybe we should > add static typing to JRuby! There's a great idea! >=20 Running on Java would of course do bugger all for that. However, I am one of the proponents of -some- (optional) ahead-of-time contract checking for Ruby. Static typing is one method of contract checking, and an easy one to implement, and in optional form wouldn't be rubbing me the wrong way. YMMV, and it's a vapourware proposition anyway - IIRC, it was pondered for Ruby 2.0, but there's no sign of that in any material describing Ruby 1.9 changes, so I'm not holding my breath. Duck typing fans will probably howl over the above comment, but if I've seen code behaviour do -any- type checking (mostly in the standard lib), it's based on #is_a?, and not on #respond_to?, so apparently most duck typing preachers really mean "I don't want to bother with any checks". David Vallner --------------enigD73F3AE29041EDDF9969F0AA Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (MingW32) iD8DBQFFVi1Ry6MhrS8astoRApLMAJ9RYKq5KrXHGAgf51fNBpVq35rLPgCfdgxf mCkkOmMOPk8wy5ITjPUnPGY= =hk5w -----END PGP SIGNATURE----- --------------enigD73F3AE29041EDDF9969F0AA--