What happened to keyword arguments for 1.8?

The pickaxe book speaks of keyword arguments planned for 1.8:

“Some languages feature ``keyword arguments’’—that is, instead of
passing arguments in a given order and quantity, you pass the name of
the argument with its value, in any order. Ruby 1.6 does not have
keyword arguments (although they are scheduled to be implemented in
Ruby 1.8).”

Since “New & Shiny” [1] didn’t speak of it, I reckon it didn’t make it.
So is this scheduled for a 1.8.x release, postponed to 2.0, or dropped
altogether?

[1] http://www.whytheluckystiff.net/articles/2003/08/04/rubyOneEightOh

/ David

This is still listed in doc/ToDo:

  • named arguments like foo(nation:=“german”) or foo(nation: “german”).

Over a year ago, there was a popular RCR
[http://www.rubygarden.org/article.php?sid=217] which provided the
second syntax above by mandating a general shortcut to symbols used as
Hash keys. This RCR has yet to be accepted/rejected.

Matz has looked into it and found it to be more difficult than expected.
[ruby-talk:19912]. I’m guessing he means fitting such syntax into the
current parser.

_why

···

David Heinemeier Hansson (david@loudthinking.com) wrote:

“Some languages feature ``keyword arguments’'—that is, instead of
passing arguments in a given order and quantity, you pass the name of
the argument with its value, in any order. Ruby 1.6 does not have
keyword arguments (although they are scheduled to be implemented in
Ruby 1.8).”

Since “New & Shiny” [1] didn’t speak of it, I reckon it didn’t make it.
So is this scheduled for a 1.8.x release, postponed to 2.0, or dropped
altogether?

If you’re writing some code that would benefit from keyword arguments,
or just want to experiment, check out

http://www.rubygarden.org/ruby?KeywordArguments

Gavin

···

On Sunday, August 17, 2003, 10:04:14 AM, David wrote:

The pickaxe book speaks of keyword arguments planned for 1.8:

“Some languages feature ``keyword arguments’'—that is, instead of
passing arguments in a given order and quantity, you pass the name of
the argument with its value, in any order. Ruby 1.6 does not have
keyword arguments (although they are scheduled to be implemented in
Ruby 1.8).”

Since “New & Shiny” [1] didn’t speak of it, I reckon it didn’t make it.
So is this scheduled for a 1.8.x release, postponed to 2.0, or dropped
altogether?

Hi,

···

In message “What happened to keyword arguments for 1.8?” on 03/08/17, David Heinemeier Hansson david@loudthinking.com writes:

“Some languages feature ``keyword arguments’'—that is, instead of
passing arguments in a given order and quantity, you pass the name of
the argument with its value, in any order. Ruby 1.6 does not have
keyword arguments (although they are scheduled to be implemented in
Ruby 1.8).”

Not in 1.8. There are more issues to consider. The experiment will
take place in 1.9 series.

						matz.