Re: [Pharo-dev] translateBy: vs translatedBy:

2015-05-27 Thread Ben Coman
On Wed, May 27, 2015 at 8:51 PM, Damien Pollet wrote: > There is a discussion of such idioms in the I will present at ESUG. I only > looked at the API of String, but I'm sure most naming idioms apply to any > class. The question is, how do you ensure they are applied and complete? Hard to be perf

Re: [Pharo-dev] translateBy: vs translatedBy:

2015-05-27 Thread Damien Pollet
There is a discussion of such idioms in the I will present at ESUG. I only looked at the API of String, but I'm sure most naming idioms apply to any class. The question is, how do you ensure they are applied and complete? On 27 May 2015 at 01:14, Ben Coman wrote: > > > > On Tue, May 26, 2015 at

Re: [Pharo-dev] translateBy: vs translatedBy:

2015-05-26 Thread Ben Coman
> > On Tue, May 26, 2015 at 6:14 PM, Ben Coman wrote: >> >> On Tue, May 26, 2015 at 9:38 PM, Peter Uhnák wrote: >> >> I vote for renaming to Rectangle>>translatedBy:, because it returns a >> >> new >> >> translated rectangle instance. >> > >> > >> > -1 >> > There is no benefit in renaming a singl

Re: [Pharo-dev] translateBy: vs translatedBy:

2015-05-26 Thread Peter Uhnák
That's not all, many methods return new rectangles via Point's API, namely Point>>{#corner: #extent: #rectangle:} I don't know if I can perform static analysis of the code (are there tools for that in Pharo?) to see which methods exactly return Rectangle rectMethods := #(#corner: #extent: #rectan

Re: [Pharo-dev] translateBy: vs translatedBy:

2015-05-26 Thread Ben Coman
On Tue, May 26, 2015 at 9:38 PM, Peter Uhnák wrote: >> I vote for renaming to Rectangle>>translatedBy:, because it returns a new >> translated rectangle instance. > > > -1 > There is no benefit in renaming a single method, apart from creating more > confusion. I wouldn't say "no benefit". Consis

Re: [Pharo-dev] translateBy: vs translatedBy:

2015-05-26 Thread Peter Uhnák
> > I vote for renaming to Rectangle>>translatedBy:, because it returns a new > translated rectangle instance. > -1 There is no benefit in renaming a single method, apart from creating more confusion. If anything, the whole Rectangle API would have to be changed, as there is plethora of similar me

Re: [Pharo-dev] translateBy: vs translatedBy:

2015-05-26 Thread Aliaksei Syrel
Hi Serge, I vote for renaming to Rectangle>>translatedBy:, because it returns a new translated rectangle instance. For example in bloc there is BlUserInputEvent and it has two methods: translateBy: and translatedBy:. First one actually modifies position (mutates object) the second one creates a tr

[Pharo-dev] translateBy: vs translatedBy:

2015-05-26 Thread Serge Stinckwich
In Pharo 4.0, there is a Rectangle>>translateBy: aFactor method. The same method in VW is called translatedBy: In Pharo, there is also a translatedToBeWithin: and translatedAndSquishedToBeWithin: and scaledBy: Just to be consistent, this is maybe better to use translatedBy: instead of translateBy