On Wed, Oct 26, 2011 at 7:30 PM, Yukihiro Matsumoto <matz / ruby-lang.org> wrote:
> Yes, there could be a language with that kind of design. But Ruby
> will not have mandatory keyword arguments. It is the design choice I
> made already. Every keyword argument will be optional in Ruby.

Can you clarify why you've already made this decision? For normal
positional arguments, there are required args, optional args, and rest
args. It seems like having the same types of arguments for keyword
args would be more consistent.

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

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?

- Charlie