12 messages in com.perforce.p4ruby[p4ruby] Canvassing opinions...
FromSent OnAttachments
Tony Smith07 Dec 2004 09:12 
Bennett, Patrick07 Dec 2004 09:42 
Tony Smith07 Dec 2004 10:08 
Bennett, Patrick07 Dec 2004 10:24 
Shackelford, John-Mason07 Dec 2004 11:08 
Johan Nilsson08 Dec 2004 00:11 
Tony Smith08 Dec 2004 06:25 
Bennett, Patrick08 Dec 2004 06:42 
Shackelford, John-Mason08 Dec 2004 08:18 
Tony Smith08 Dec 2004 08:20 
Tony Smith08 Dec 2004 08:24 
Tony Smith09 Dec 2004 05:47 
Subject:[p4ruby] Canvassing opinions...
From:Bennett, Patrick (Patr@inin.com)
Date:12/08/2004 06:42:10 AM
List:com.perforce.p4ruby

-----Original Message----- From: p4ru@perforce.com [mailto:p4ru@perforce.com] On Behalf Of Johan Nilsson Sent: Wednesday, December 08, 2004 3:12 AM To: p4r@perforce.com Subject: RE: [p4ruby] Canvassing opinions...

What about appending _field instead? Prepending underscores certainly means less typing, but it's a bit too cute (i.e. ugly) for me. Some alternatives:

client.root_field = "/tmp" client["root"] = "/tmp" # redefine to validate client.fields["root"] = "/tmp" # same

Anyway, what's the problem with name collisions - you mean that the existing users expect an 'update' method (doing Hash#update) available on the 'spec' object?

With the risk of breaking compability, why not use delegation/aggregation instead and provide e.g. to_h/from_h methods in the Spec class?