From: matz@... Date: 2017-11-29T06:26:48+00:00 Subject: [ruby-core:83943] [Ruby trunk Feature#8563][Rejected] Instance variable arguments Issue #8563 has been updated by matz (Yukihiro Matsumoto). Status changed from Assigned to Rejected My opinion has not been changed from https://bugs.ruby-lang.org/issues/8563#note-3 I am strongly against code like ~~~ def initialize(@foo, @bar) end ~~~ I don't care about `define_attr_initialize` not being "the solution". Matz. ---------------------------------------- Feature #8563: Instance variable arguments https://bugs.ruby-lang.org/issues/8563#change-68004 * Author: sawa (Tsuyoshi Sawada) * Status: Rejected * Priority: Normal * Assignee: matz (Yukihiro Matsumoto) * Target version: ---------------------------------------- Often times, people want to assign given arguments to instance variables, especially inside the method `initialize`: ~~~Ruby def initialize foo, bar, buz @foo, @bar, @buz = foo, bar, buz ... end ~~~ I propose to let method definition take instance variables as arguments so that: ~~~Ruby def initialize @foo, @bar, @buz ... end ~~~ would be equivalent as above. -- https://bugs.ruby-lang.org/ Unsubscribe: