#onDNU:do:

That one's not so good.  Not so much because of the acronym, but because
it's unclear about what the argument is.  A better name would be
#onUndefinedSelector:do:

#gcd:
#lcm:

These come from elementary (primary school in my day) mathematics.  They
are the standard names.

#rem:
#quo:

These are not acronyms.  They are more intelligible than // and \\.  But
yes,
{floor,ceiling,rounded,truncated}{Quotient,Remainder}:
would be clearer.  #quo: and #rem: are sufficiently rare
that it wouldn't hurt if they were longer.
BUT they are in the Blue Book and in the standard.

#ulp

This is indeed an acronym, and it's probably obscure
to many programmers.  But practically every paper I have read about
floating-point issues uses this; it is
a technical term of art.  Spelling it out as #unitOfLeastPrecision as
VisualWorks does, and as
both Squeak and Pharo do in their comments, is the
reverse of helpful, because that is not what 'ulp'
stands for. It's Unit in the Last Place.  Now there IS
a case for giving #ulp a long name, but that's not it.
There are some subtleties in the definition.
http://www.ens-lyon.fr/LIP/Pub/Rapports/RR/RR2005/RR2005-09.pdf
lists, by my count, five definitions.  The first is obsolete,
The fifth is a hybrid of some of the others.  It turns out
that I knew less about ULPs than I thought I did.

#ln

#NaperianLogarithm won't help anyone who doesn't
know who Napier was or what a logarithm is.  I
suppose #logarithmToBaseE might work.

#theta

That is not an acronym.  It is spelled out in full.
Using Greek letters for arbitrary angles goes back
roughly two thousand years.  To the Greeks, in fact.
Blame them, not Pharo.

#r
#g
#b

I can think of at least two meanings for each of these, so granted.


Click here to Reply or Forward
0.2 GB (1%) of 15


On 8 May 2018 at 04:57, webwarrior <r...@webwarrior.ws> wrote:

> If you guys are to get rid of acronyms in method names, cosider the
> following:
>
> #onDNU:do:
> #gcd:
> #lcm:
> #rem:
> #quo:
> #ulp
> #ln
> #theta
> #r
> #g
> #b
>
> and others.
> Then if you get bored again there are a lot of contractions, too,
> especially
> in Number and subclasses.
> Like #abs, #sqrt, #sin, #cos, ...
>
>
>
> --
> Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html
>
>

Reply via email to