[Pharo-project] ContextPart >> copyTo: -> copyUpTo: ?
frank.shearar at gmail.com
Wed Jul 25 08:22:45 EDT 2012
On 25 July 2012 13:19, Mariano Martinez Peck <marianopeck at gmail.com> wrote:
> On Wed, Jul 25, 2012 at 1:30 PM, Frank Shearar <frank.shearar at gmail.com>
>> On 25 July 2012 11:42, Mariano Martinez Peck <marianopeck at gmail.com>
>> > Guys. Did I miss something or ContextPart>>copyTo: should be renamed to
>> > #copyUpTo: ?
>> You feel that #copyTo: implies an inclusive bound?
>> There's only one
>> #copyTo: implementor (ContextPart) and only one #copyUpTo:
>> (SequenceableCollection) and both are "up to and including" copies. In
>> other words there isn't a clear precedence one way or the other for
>> having #copyTo: meaning either "and including" or "not including".
>> Your argument is, I guess, that there should be? (The method comments
>> are perfectly clear on what both method do, at least.)
> With #copyTo: I feel that I am copying from one place (source) to a target,
> when what it actually does (if I understood correctly) is to copy the source
> (receiver) up to the parameter (stop there). So #copyTo: is totally
By that argument the correct name would be #copyFromSelfTo: or
#copyFromHereTo:, neither of which look appetising. (The names would
semi-parallel SequenceableCollection's #copyFrom:to:, only a
ContextPart is already an element in a collection.)
>> > Thanks,
>> > --
>> > Mariano
>> > http://marianopeck.wordpress.com
More information about the Pharo-dev