work in progress | array


proposal for class ARRAY

Add feature is_empty

Proposal

Proposal for class ARRAY:

Add feature 'is_empty'.

Please select one of the following:

History

Feature is_empty is not present in class ARRAY or STRING in the 1995 standard. However, empty is present in class STRING in the 1995 standard, and a recent poll in this group supported changing feature empty to is_empty in class STRING.

All vendors currently support empty in ARRAY, although in VE it's marked obsolete.

Background

is_empty is a convenience feature. It's always possible to test for count > 0 instead.

Rationale

Although the feature name empty has a long history of use in STRING and ARRAY, most users consider is_empty to be a better choice of name. A particular problem with empty is that it can also be a verb - suggesting a command to empty out the STRING or ARRAY.

Dependencies

If is_empty is added to ARRAY, it makes sense to rename empty to is_empty in class STRING. This is already part of the current proposal for STRING.

Discussion

I can't find any discussion of this issue.

Impact of proposed change

Low.

A vendor may continue to support empty. Alternatively, a vendor may declare empty to be "obsolete" and recommend the use of is_empty instead.

Result

The proposal was accepted.

Voting details

votes cast at eGroups:

Accept the proposal
                chcouder@club-internet.fr
                manus@eiffel.com
                richieb@netlabs.net
                ericb@gobosoft.com
                franck.arnaud@omgroup.com
                peter@deakin.edu.au
                saunders@wchat.on.ca
                kwaxer@aha.ru
Strongly accept the proposal
                sergei_ivanov@object-tools.com
                joachim.durchholz@halstenbach.de
                andreas.leitner@teleweb.at
                genepi@sympatico.ca
                tking@insystems.com
                jweirich@one.net
Don't mind (happy either way)
                jcm@mstr.hgc.edu
                simonwillcocks@enterprise.net

votes sent to the discussion list:

-