Rename #isIntegerObject: and friends

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

Rename #isIntegerObject: and friends

Mariano Martinez Peck
 
Hi guys. I notice that most of the times, the usage of #isIntegerObject: is for checking whether the object is immediate or not, rather than if it is an Integer.
In addition, when we will have 64 bits, I guess we will encode more objects (small floats, dates, points, etc) than just integers...

So, what about renaming #isIntegerObjects: and friends to something like #isImmediateObject:   ?  I know that changing #isIntegerObject: or things like that is too heavy, but maybe we can start by deprecating it, or for the new code, to use #isImmediateObject:   instead... so we start preparing ourselves for the future, in little steps.

cheers

Mariano
Reply | Threaded
Open this post in threaded view
|

Re: Rename #isIntegerObject: and friends

Eliot Miranda-2
 


On Tue, Mar 8, 2011 at 12:00 AM, Mariano Martinez Peck <[hidden email]> wrote:
 
Hi guys. I notice that most of the times, the usage of #isIntegerObject: is for checking whether the object is immediate or not, rather than if it is an Integer.
In addition, when we will have 64 bits, I guess we will encode more objects (small floats, dates, points, etc) than just integers...

+1.  When I add immediate characters I will do this.  I also did this when I ported the Slang plugin system to VisualWorks in order to steal the WarpBlt plugin.
 

So, what about renaming #isIntegerObjects: and friends to something like #isImmediateObject:   ?  I know that changing #isIntegerObject: or things like that is too heavy, but maybe we can start by deprecating it, or for the new code, to use #isImmediateObject:   instead... so we start preparing ourselves for the future, in little steps.

I like isImmediate:.
 

cheers

Mariano


Reply | Threaded
Open this post in threaded view
|

Re: Rename #isIntegerObject: and friends

Mariano Martinez Peck
 


On Thu, Mar 10, 2011 at 11:50 AM, Eliot Miranda <[hidden email]> wrote:


On Tue, Mar 8, 2011 at 12:00 AM, Mariano Martinez Peck <[hidden email]> wrote:
 
Hi guys. I notice that most of the times, the usage of #isIntegerObject: is for checking whether the object is immediate or not, rather than if it is an Integer.
In addition, when we will have 64 bits, I guess we will encode more objects (small floats, dates, points, etc) than just integers...

+1.  When I add immediate characters I will do this.  I also did this when I ported the Slang plugin system to VisualWorks in order to steal the WarpBlt plugin.
 

excellent,
 

So, what about renaming #isIntegerObjects: and friends to something like #isImmediateObject:   ?  I know that changing #isIntegerObject: or things like that is too heavy, but maybe we can start by deprecating it, or for the new code, to use #isImmediateObject:   instead... so we start preparing ourselves for the future, in little steps.

I like isImmediate:.
 

Good. The only thing I would do is to take care where isIntegerObject: is used to really know if the object is an integer (not immediae). Maybe you do a kind of automatic refactor hehehe

cheers

mariano
 

cheers

Mariano



Reply | Threaded
Open this post in threaded view
|

Re: Rename #isIntegerObject: and friends

David T. Lewis
 
On Thu, Mar 10, 2011 at 12:01:34PM +0100, Mariano Martinez Peck wrote:

>  
> On Thu, Mar 10, 2011 at 11:50 AM, Eliot Miranda <[hidden email]>wrote:
>
> >
> >
> > On Tue, Mar 8, 2011 at 12:00 AM, Mariano Martinez Peck <
> > [hidden email]> wrote:
> >
> >>
> >> Hi guys. I notice that most of the times, the usage of #isIntegerObject:
> >> is for checking whether the object is immediate or not, rather than if it is
> >> an Integer.
> >> In addition, when we will have 64 bits, I guess we will encode more
> >> objects (small floats, dates, points, etc) than just integers...
> >>
> >
> > +1.  When I add immediate characters I will do this.  I also did this when
> > I ported the Slang plugin system to VisualWorks in order to steal the
> > WarpBlt plugin.
> >
> >
>
> excellent,
>
>
> >
> >> So, what about renaming #isIntegerObjects: and friends to something like
> >> #isImmediateObject:   ?  I know that changing #isIntegerObject: or things
> >> like that is too heavy, but maybe we can start by deprecating it, or for the
> >> new code, to use #isImmediateObject:   instead... so we start preparing
> >> ourselves for the future, in little steps.
> >>
> >
> > I like isImmediate:.

+1

> >
> >
>
> Good. The only thing I would do is to take care where isIntegerObject: is
> used to really know if the object is an integer (not immediae). Maybe you do
> a kind of automatic refactor hehehe

Yes for sure. #isImmediate: and #isIntegerObject: are two different
concepts that happen to have the same implementation in the current
object memory (likewise for the current 64-bit object memory, which
is the simplest possible extension of the 32-bit object memory).

Dave