Picky with the pesky names

francisco.j.garau at jpmorgan.com francisco.j.garau at jpmorgan.com
Wed Apr 19 11:35:05 UTC 2006


I am writing a test case that looks like this:

        self assert: (level between: -1 and: 1)

I wrote a method in Magnitude to help me write the above expression in a 
more readable way.

        self assert: (level inside: -1 at 1)

Where #inside: is defined as follows: 

    Magnitude >> inside: intervalPoint
        "Alternative way of expressing inclusion within an interval
        (0.5 inside: -1 at 1) = (0.5 between: -1 and: 1)
        "
        ^self between: intervalPoint x and: intervalPoint y

As you can see, the method is trivial, the name is not. Several 
alternatives names come to my mind:

        0.5 inside: -1 at 1
        0.5 in: -1 at 1
        0.5 within: -1 at 1 
        0.5 included: -1 at 1 
        0.5 belongsTo: -1 at 1

Any preference? Or am I being too picky with the pesky names?

---
Francisco Garau
0207 777 1362 - x71362


This communication is for informational purposes only. It is not intended
as an offer or solicitation for the purchase or sale of any financial
instrument or as an official confirmation of any transaction. All market prices,
data and other information are not warranted as to completeness or accuracy and
are subject to change without notice. Any comments or statements made herein 
do not necessarily reflect those of JPMorgan Chase & Co., its subsidiaries 
and affiliates.



More information about the Squeak-dev mailing list