Comment on this RCR (edit wiki page) | RCRchive home

RCR 240: avoid asymmetry of extend_object/append_features

submitted by neoneye on Sat Apr 10 2004 08:00:35 AM -0700

Status: pending


Abstract

There is a saying: avoid asymmetry

we have

extended       <->   included
extend_object  <->   "append_features"

symmetry would be nice in ruby2

Problem

I bet the asymmetry confuses more than it helps. Besides that super must be invoked.

See [].

Proposal

Either name them something symmetrically or remove them completely.

Analysis

don't know what to write here.

Implementation

don't know what to write here.

Vote for this RCR

Strongly opposed [0]
Opposed [1]
Neutral [0]
In favor [1]
Strongly advocate [0]

Change the status of this RCR to:

accepted

rejected

withdrawn


See the rest of the thread on ruby-talk; it's already gone past this point. Matz indicated he would rather remove extend_object and append_features. I made the point that "extended" and "included" is itself a false symmetry, because the object gets extended while the module gets included. So to have them both be used as verbs from the module perspective is wrong. The symmetrical version would be something like "included" and "extending".

(Matz hasn't responded to my point yet :-)

Keep in mind that symmetry can be conceptual; it doesn't have to mean that the words look the same. Also, it's not a law; it's just one of many design principles.

-- David Black


David, that a good observation. I would vote yes to "<tt>extending</tt>". Unfortunatly you posts doesn't show up in my newsreader, so I havn't seen this post until now. If Im not able to see your posts, then perhaps matz isn't able to see them either? That could be the reason that there is no replies?

Its a shame good messages gets lost this way.

-- Simon Strandgaard

Add comments here

Back to RCRchive.


RCR Submission page and RCRchive powered by Ruby, Apache, RuWiki (modified), and RubLog