From: Clemens Hintze Date: 1999-05-26T11:28:38+02:00 Subject: [ruby-talk:00348] Re: Struct.new On Wed, 26 May 1999, you wrote: >Hi. > >In message "[ruby-talk:00341] Struct.new" > on 99/05/25, "Michael Neumann" writes: > Hi too, [...] >Hmm, it's really easy to relax the member check (with included >patch). But I want to discuss whether we should choose this behavior >or not. What do you guys (other than Pros) think about this? > > matz. sorry, no other than Pros :-) I think we should relax it. As I remember a future version of Ruby could have keyword argument passing (hi, matz :-) so that we could decide to call it: s = St.new s = St.new(3) s = St.new(3,4) s = St.new(first:=3) # Syntax not fixed yet! s = St.new(second:=4) # Syntax not fixed yet! s = St.new(first:=3, second:=4) # Syntax not fixed yet! So we would not have to change the behavior in future again, would we? IMHO it should be okay to return nil for members not set. Perhaps a possibility, to give every member explicite a default value if it is not set, would be fine. Just my $0.02 [...] Clemens.