From: Joshua Ballanco Date: 2011-10-27T10:05:21+09:00 Subject: [ruby-core:40428] Re: [ruby-trunk - Feature #5474][Assigned] keyword argument --20cf300e50bbcd905204b03d5d94 Content-Type: text/plain; charset=UTF-8 On Wed, Oct 26, 2011 at 8:30 PM, Yukihiro Matsumoto wrote: > Hi, > > In message "Re: [ruby-core:40418] Re: [ruby-trunk - Feature > #5474][Assigned] keyword argument" > on Thu, 27 Oct 2011 04:03:52 +0900, Joshua Ballanco < > jballanc@gmail.com> writes: > > |I think the point is that not every argument necessarily has a reasonable > |default. Imagine, for example, if we were to rewrite File.open to take > |keyword arguments: > | > | class File > | def self.open(filename:, mode: 'r') > | ... > > 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. > Thank you for the clarification. I am slowly understanding the direction and motivation behind the keyword arguments feature. --20cf300e50bbcd905204b03d5d94 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
On Wed, Oct 26, 2011 at 8:30 PM, Yukihiro Matsum= oto <matz@ruby-l= ang.org> wrote:
Hi,

In message "Re: [ruby-core:40418] Re: [ruby-trunk - Feature #5474][Ass= igned] keyword argument"
=C2=A0 =C2=A0on Thu, 27 Oct 2011 04:03:52 +0900, Joshua = Ballanco <jballanc@gmail.com&g= t; writes:

|I think the point is that not every argument necessarily has a reasonable<= br> |default. Imagine, for example, if we were to rewrite File.open to take
|keyword arguments:
|
| =C2=A0 =C2=A0class File
| =C2=A0 =C2=A0 =C2=A0def self.open(filename:, mode: 'r')
| =C2=A0 =C2=A0 =C2=A0...

Yes, there could be a language with that kind of design. =C2=A0But Ru= by
will not have mandatory keyword arguments. =C2=A0It is the design choice I<= br> made already. =C2=A0Every keyword argument will be optional in Ruby.

Thank you for the clarification. I am slowly = understanding the direction and motivation behind the keyword arguments fea= ture.=C2=A0
--20cf300e50bbcd905204b03d5d94--