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

RCR 238: Remove set methods from Array

submitted by kgergely on Thu Apr 01 2004 04:26:42 AM -0800

Status: pending


Abstract

In the current implementation arrays and sets are mixed, there are some methods, which should exist in Sets, not in Arrays

Problem

Don't mix these two things.

Proposal

Remove the following (two) methods: & |

Analysis

This should force the use of Sets if neccecary, code breaks, but helps new programmers not to mix arrays with sets. (Look at php and arrays and hashes...)

Vote for this RCR

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

Change the status of this RCR to:

accepted

rejected

withdrawn


What do you mean by "separate Arrays and sets"?

I have no idea what change to Array class you are proposing. RCR should be concrete. Please re-submit the RCR, if you propose something seriously.

--matz.


Basically, the removal of Array#& and Array#| is being recommended to enforce the use of Set for those things. I am opposed to the suggestion as it stands, even though I don't currently use Array#& and Array#|. I really don't know what value it provides to enforce the use of Set as opposed To Array, and this appears to be what is really missing from the RCR. The suggestion is "conceptually" clean, but aside from conceptual cleanliness, I don't see an upside here. -- Austin Ziegler

Add comments here


Back to RCRchive.


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