[#61822] Plan Developers Meeting Japan April 2014 — Zachary Scott <e@...>
I would like to request developers meeting around April 17 or 18 in this month.
14 messages
2014/04/03
[#61825] Re: Plan Developers Meeting Japan April 2014
— Urabe Shyouhei <shyouhei@...>
2014/04/03
It's good if we have a meeting then.
[#61826] Re: Plan Developers Meeting Japan April 2014
— Zachary Scott <e@...>
2014/04/03
Regarding openssl issues, I’ve discussed possible meeting time with Martin last month and he seemed positive.
[#61833] Re: Plan Developers Meeting Japan April 2014
— Martin Bo煬et <martin.bosslet@...>
2014/04/03
Hi,
[#61847] Re: Plan Developers Meeting Japan April 2014
— Eric Wong <normalperson@...>
2014/04/03
Martin Boテ殕et <martin.bosslet@gmail.com> wrote:
[#61849] Re: Plan Developers Meeting Japan April 2014
— Zachary Scott <e@...>
2014/04/04
I will post summary of meeting on Google docs after the meeting.
[#61852] Re: Plan Developers Meeting Japan April 2014
— Eric Wong <normalperson@...>
2014/04/04
Zachary Scott <e@zzak.io> wrote:
[#61860] Re: Plan Developers Meeting Japan April 2014
— Zachary Scott <e@...>
2014/04/04
I’m ok with redmine, thanks for bringing up your concern!
[#62076] Candidacy to 2.1 branch maintainer. — Tomoyuki Chikanaga <nagachika00@...>
Hello,
7 messages
2014/04/17
[#62078] Re: Candidacy to 2.1 branch maintainer.
— SHIBATA Hiroshi <shibata.hiroshi@...>
2014/04/17
> And does anyone have counter proposal for 2.1 maintenance?
[ruby-core:61993] [ruby-trunk - Feature #9565] Unifying the methods (const|class_variable|instance_variable)_(defined?|get|set)
From:
transfire@...
Date:
2014-04-11 19:12:39 UTC
List:
ruby-core #61993
Issue #9565 has been updated by Thomas Sawyer.
+1 Fewer methods to remember. Could be used for global vars too. Is `token` the best term though?
----------------------------------------
Feature #9565: Unifying the methods (const|class_variable|instance_variable)_(defined?|get|set)
https://bugs.ruby-lang.org/issues/9565#change-46184
* Author: Tsuyoshi Sawada
* Status: Rejected
* Priority: Normal
* Assignee:
* Category:
* Target version:
----------------------------------------
An argument to methods of the form `(const|class_variable|instance_variable)_(defined?|get|set)` already describes if it is meant to be a constant, class variable, or instance variable. For example, if `"Foo"` were to be used as an argument, a meaningful usage may be using it with `const_get`, but not `class_variable_get` or `instance_variable_get`. Whenever I use these methods, I feel redundancy and extra burden of having to repeat the information twice (once by method name and once by capitalization/sigil).
I propose that if we use a common word (let's say `token`, but I am not sure of this naming) in place of the words `const`, `class_variable`, and `instance_variable`, and have methods to unify them and get rid of the redundancy, then it would be easier for programmers. Particularly, `Object` should have the following instance methods that are aliases of the conventional methods:
token_defined? ==> instance_variable_defined?
token_get ==> instance_variable_get
token_set ==> instance_variable_set
and `Module` should have the following instance methods that call different methods or error depending on the first argument:
token_defined? ==> const_defined? (for capitalized arguments like "Foo")
==> class_variable_defined? (for arguments prepended with @@)
==> instance_variable_defined? (for arguments prepended with @)
==> Error (otherwise)
token_get ==> const_get (for capitalized arguments like "Foo")
==> class_variable_get (for arguments prepended with @@)
==> instance_variable_get (for arguments prepended with @)
==> Error (otherwise)
token_set ==> const_set (for capitalized arguments like "Foo")
==> class_variable_set (for arguments prepended with @@)
==> instance_variable_set (for arguments prepended with @)
==> Error (otherwise)
So when we use this, we do not have to think about the complicated method name; we just need to provide the right argument:
module A
token_defined?("Foo") # => false
token_set("Foo", 1)
token_get("Foo") # => 1
token_defined?("@@foo") # => false
token_set("@@foo", 2)
token_get("@@foo") # => 2
token_defined?("@foo") # => false
token_set("@foo", 3)
token_get("@foo") # => 3
end
--
https://bugs.ruby-lang.org/