From: Charles Oliver Nutter Date: 2011-10-27T02:51:51+09:00 Subject: [ruby-core:40414] Re: [ruby-trunk - Feature #5474][Assigned] keyword argument More refinement below. I think we're on a good path here. On Sun, Oct 23, 2011 at 7:53 AM, Yusuke Endoh wrote: > �� ��def create_point(x, y, color: "white", size: 1) > �� �� ��# keyword arguments ��^^^^^^^^^^^^^^^^^^^^^^^ here! > > �� �� ��p [x, y, color, size] > �� ��end Evan and I would like to see support for non-default keyword args. So the following form would require that "size" be provided as a keyword arg, and otherwise raise an ArgumentError: def create_point(x, y, color: "white", size:) ... The trailing ":" on an argument would then indicate that it's a keyword arg, and the default value would not be necessary. I don't think this would be any harder to parse, either, since there's no valid production where "," follows ":". Also, after talking with Evan, I think we're both optimistic that Yusuke's proposal can be implemented with good performance...certainly much better performance than constructing a full-on Hash object as is the case today. - Charlie