From: Nobuyoshi Nakada Date: 2011-10-27T17:16:24+09:00 Subject: [ruby-core:40447] Re: [ruby-trunk - Feature #5474][Assigned] keyword argument Hi, (11/10/27 11:02), Charles Oliver Nutter wrote: > Also, Evan pointed out to me that if Ruby doesn't support mandatory > keyword arguments, you're going to see a *lot* of this pattern: > > def foo(a: nil) > raise ArgumentError, 'must pass value for a' unless a > .. > end It should be a positinal argument. I can't get why it must be a keyword argument. > So in essence, by making all keyword arguments optional, you're > forcing users to do their own required argument checks. Is that going > to make programmers happy? An alternative: def foo(a: raise(ArgumentError)) end -- Nobu Nakada