From: David Vallner Date: 2006-11-14T07:29:53+09:00 Subject: Re: returning keyword --------------enigB2FE51E3FFE57140EC51D562 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable ara.t.howard@noaa.gov wrote: > On Tue, 14 Nov 2006, S. Robert James wrote: >=20 >> I still maintain that this is clever code. Every new (pseudo)keyword >> comes >> at a cost, of having to learn (and keep in your head) something new.=20 >> They >> have to justify their cost by truly cleaning up the code - and I haven= 't >> seen an example of that yet. >=20 > that is a reasonable thing to say - imho you'd need something like this= > to do > so >=20 >=20 > def factory > returning Object.new do |o| > o.property_0 =3D 'value_0' [snip] > o.property_127 =3D 'value_127' > end > end >=20 > -a ^(Foo new) name: 'fred'; surname: 'flintstone'; wife: wilma; yourself. I think that one's on the top of my list of Little Smalltalk Features I Miss. No pseudokeywords, no having to bend setters / add_whatever methods backwards, or decide in the library whether to return self or the added object / setter value. David Vallner --------------enigB2FE51E3FFE57140EC51D562 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) iD8DBQFFWPHby6MhrS8astoRAoHZAJsFCYLMPbqO8wfx0JJPV10QmZmrGACePAv4 wWOuV3u+4X/sSGdZrEQYdnU= =q0rz -----END PGP SIGNATURE----- --------------enigB2FE51E3FFE57140EC51D562--