Feature #4065
closedRename or alias module#append_features to module#include_module
Description
=begin
Hi,
For Object#extend, the hook/callbacks methods are extend_object and extended.
For Module#include, the hook/callbacks methods are append_features and included.
The name append_features is a bit confusing / inconsistent.
What about renaming append_features to include_module (similar as extend_object for extend) ?
Alternatively, include_module could be defined as an alias to append_features (the latter could be made deprecated).
Thanks.
=end
Updated by Chauk-Mean (Chauk-Mean Proum) almost 14 years ago
=begin
Given the discussion from http://www.ruby-forum.com/topic/469691#new ,
I revised my proposal as following :
For Object#extend, the hook/callbacks methods would be :
- pre_extended (instead of extend_object)
- extended (no change)
For Module#include, the hook/callbacks methods would be : - pre_included (instead of append_features)
- included (no change)
The advantages of this renaming are :
- there is a name relationship between the three related methods e.g. include, pre_included, included.
- the pre prefix clearly means that those callbacks are called before the actual extension/inclusion (if any).
- both included/extended can mean has or was included/extended so this take care of the "English meaning" issue regarding include vs extend.
Thanks.
=end
Updated by matz (Yukihiro Matsumoto) almost 14 years ago
=begin
Hi,
In message "Re: [ruby-core:33419] [Ruby 1.9-Feature#4065] Rename or alias module#append_features to module#include_module"
on Sat, 27 Nov 2010 17:14:44 +0900, Chauk-Mean Proum redmine@ruby-lang.org writes:
|Issue #4065 has been updated by Chauk-Mean Proum.
|
|Given the discussion from http://www.ruby-forum.com/topic/469691#new ,
|
|I revised my proposal as following :
|For Object#extend, the hook/callbacks methods would be :
|- pre_extended (instead of extend_object)
|- extended (no change)
|For Module#include, the hook/callbacks methods would be :
|- pre_included (instead of append_features)
|- included (no change)
I don't think it is worth breaking many existing programs that use
extend_object / append_feature for aesthetic reason. Besides that,
unlike extended, extend_object is not a hook.
matz.
=end
Updated by marcandre (Marc-Andre Lafortune) over 13 years ago
- Status changed from Open to Rejected