Login  Register

ContextPart >> copyTo: -> copyUpTo: ?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options Options
Embed post
Permalink
Reply | Threaded
Open this post in threaded view
| More
Print post
Permalink

ContextPart >> copyTo: -> copyUpTo: ?

Mariano Martinez Peck
9001 posts
Guys. Did I miss something or ContextPart>>copyTo:  should be renamed to #copyUpTo:  ?
Reply | Threaded
Open this post in threaded view
| More
Print post
Permalink

Re: ContextPart >> copyTo: -> copyUpTo: ?

Frank Shearar-3
3200 posts
On 25 July 2012 11:42, Mariano Martinez Peck <[hidden email]> wrote:
> 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.)

frank

> Thanks,
>
> --
> Mariano
> http://marianopeck.wordpress.com
>

Reply | Threaded
Open this post in threaded view
| More
Print post
Permalink

Re: ContextPart >> copyTo: -> copyUpTo: ?

Mariano Martinez Peck
9001 posts


On Wed, Jul 25, 2012 at 1:30 PM, Frank Shearar <[hidden email]> wrote:
On 25 July 2012 11:42, Mariano Martinez Peck <[hidden email]> wrote:
> 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 misleading. 

 
frank

> Thanks,
>
> --
> Mariano
> http://marianopeck.wordpress.com
>




--
Mariano
http://marianopeck.wordpress.com

Reply | Threaded
Open this post in threaded view
| More
Print post
Permalink

Re: ContextPart >> copyTo: -> copyUpTo: ?

Frank Shearar-3
3200 posts
On 25 July 2012 13:19, Mariano Martinez Peck <[hidden email]> wrote:

>
>
> On Wed, Jul 25, 2012 at 1:30 PM, Frank Shearar <[hidden email]>
> wrote:
>>
>> On 25 July 2012 11:42, Mariano Martinez Peck <[hidden email]>
>> wrote:
>> > 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
> misleading.

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.)

frank

>> frank
>>
>> > Thanks,
>> >
>> > --
>> > Mariano
>> > http://marianopeck.wordpress.com
>> >
>>
>
>
>
> --
> Mariano
> http://marianopeck.wordpress.com
>