[rcr] rename append_features -> include_object

There is a saying: avoid asymmetry

we have
extended <-> included
extend_object <-> “append_features”

symmetry would be nice in ruby2

···


Simon Strandgaard

Hi,

···

In message “[rcr] rename append_features → include_object” on 04/03/22, Simon Strandgaard neoneye@adslhome.dk writes:

There is a saying: avoid asymmetry

we have
extended ↔ included
extend_object ↔ “append_features”

symmetry would be nice in ruby2

But append_features does “append features” to the class/module. The
name “include_object” is quite misleading.

I’d rather remove extend_object and append_features, which is older
than included/extended hooks.

						matz.

Hi –

Hi,

There is a saying: avoid asymmetry

we have
extended ↔ included
extend_object ↔ “append_features”

symmetry would be nice in ruby2

But append_features does “append features” to the class/module. The
name “include_object” is quite misleading.

I’d rather remove extend_object and append_features, which is older
than included/extended hooks.

Actually included/extended is a little misleading too. You would say:

A module gets included in (or by) another module.

so Module#included makes sense. But you would not say:

A module gets extended in (or by) another module.

Rather, from the module’s point of view, it’s more like:

A module serves to extend an object.

Module#extended sounds like the Module object itself is being extended
(by another module).

In this case, I don’t think the language should be symmetrical,
because the two actions are not. I would be inclined toward something
more like:

Module#included # passive, included by another object
Module#extending # active, extending another object

David

···

On Mon, 22 Mar 2004, Yukihiro Matsumoto wrote:

In message “[rcr] rename append_features → include_object” > on 04/03/22, Simon Strandgaard neoneye@adslhome.dk writes:


David A. Black
dblack@wobblini.net

There is a saying: avoid asymmetry

we have
extended ↔ included
extend_object ↔ “append_features”

symmetry would be nice in ruby2

But append_features does “append features” to the class/module. The
name “include_object” is quite misleading.

true

I’d rather remove extend_object and append_features, which is older
than included/extended hooks.

Seems as the right choice. Thanks Matz.

···

On Mon, 22 Mar 2004 08:37:10 +0900, Yukihiro Matsumoto wrote:

In message “[rcr] rename append_features → include_object” > on 04/03/22, Simon Strandgaard neoneye@adslhome.dk writes:


Simon Strandgaard