RE: [eiffel-nice-library] STRING 'append_character', 'append_string'
- Good morning.
On Thursday, September 28, 2000 7:31 PM, Roger Browne [SMTP:egroups@...] wrote:
> Simon Parker wrote:
> > ...I'm reminded of another pet hate: single-character names.
> > Can we call the argument 'other'?
> Single-character names are sprinkled throughout ELKS ARRAY and STRING, and
> I have seen various authors defend their use for arguments and locals.
> I'd like to leave 'insert_string' unchanged for now. If you would like
> this group to consider the issue of argument names, I suggest that you do
> one of the following:
> (a) Propose a general principle for argument names (e.g. "never
> use one-character names" or "use one-character names only
> under circumstances X and Y". Then, if this group agrees,
> we can revise the entire class to make it consistent with
> the general principle, or
Tempting, but a bit negative. Context would be important in selecting alternatives.
I might suggest some standard names for common situations, in the spirit of our recent 'not_void' decision.
> (b) After the substance of ELKS2001 STRING is complete, and when
> we are discussing stylistic issues, submit a set of proposed
> argument renamings that will yield a consistent, clean interface.
Yes, this is a better way.
> You suggested the name 'other' instead of 's'. I don't know that 'other'
> carries any more information than a single character. In my "day job", I
> use 'other' only for commutative operations. ELKS follows a similar
> convention in some places (e.g. "infix <", "infix +", 'is_equal') but is
> not consistent.
My own guidelines aren't so refined. I'll give it more thought, while we get back to the substance.
Simon Parker +353 87 249 7859