is class-side name setter used by the system

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

is class-side name setter used by the system

Peter Uhnak
Hi,

is the class-side "name:" setter used by the system itself?
Because I remember many times overriding it for my own needs and it never broke anything as far as I know... which makes it strange why it even exists (because it is a trap).

Thanks,
Peter
Reply | Threaded
Open this post in threaded view
|

Re: is class-side name setter used by the system

Guillermo Polito
Hi Peter,

On Mon, Sep 17, 2018 at 9:57 AM Peter Uhnak <[hidden email]> wrote:
Hi,

is the class-side "name:" setter used by the system itself? 
Because I remember many times overriding it for my own needs and it never broke anything as far as I know... which makes it strange why it even exists (because it is a trap).

I remember students doing stuff like

AClass name: 'blah'.

And breaking everything.
I agree that the situation is not optimal... We were discussing at some point to rename those reflective methods adding a "reflective" prefix. That would avoid such problems but it would become a bit more verbose.

Guille

Reply | Threaded
Open this post in threaded view
|

Re: is class-side name setter used by the system

tesonep@gmail.com
In reply to this post by Peter Uhnak
Hi Peter,
   there is no more #name: in Class (or ClassDescription or Behavior). It is named #setName:
It is only used by the class builder, some class methods and some tests. It could be hidden better if it is still a problem.

Cheers.


On Mon, Sep 17, 2018 at 9:57 AM Peter Uhnak <[hidden email]> wrote:
Hi,

is the class-side "name:" setter used by the system itself?
Because I remember many times overriding it for my own needs and it never broke anything as far as I know... which makes it strange why it even exists (because it is a trap).

Thanks,
Peter


--
Pablo Tesone.
[hidden email]
Reply | Threaded
Open this post in threaded view
|

Re: is class-side name setter used by the system

Peter Uhnak
My uni is starting a Pharo course soon and we were thinking about making a custom Pharo 6 image with name: blocked, just to avoid trouble, but I was just checking here whether it can breaking something unexpected.

Thanks,
Peter

On Mon, Sep 17, 2018 at 10:18 AM [hidden email] <[hidden email]> wrote:
Hi Peter,
   there is no more #name: in Class (or ClassDescription or Behavior). It is named #setName:
It is only used by the class builder, some class methods and some tests. It could be hidden better if it is still a problem.

Cheers.


On Mon, Sep 17, 2018 at 9:57 AM Peter Uhnak <[hidden email]> wrote:
Hi,

is the class-side "name:" setter used by the system itself?
Because I remember many times overriding it for my own needs and it never broke anything as far as I know... which makes it strange why it even exists (because it is a trap).

Thanks,
Peter


--
Pablo Tesone.
[hidden email]
Reply | Threaded
Open this post in threaded view
|

Re: is class-side name setter used by the system

Marcus Denker-4
In reply to this post by tesonep@gmail.com


On 17 Sep 2018, at 10:17, [hidden email] wrote:

Hi Peter,
   there is no more #name: in Class (or ClassDescription or Behavior). It is named #setName:
It is only used by the class builder, some class methods and some tests. It could be hidden better if it is still a problem.


yes, we should deprecate name: and only use setName: (that is what it used to be originally anyway)

Cheers.


On Mon, Sep 17, 2018 at 9:57 AM Peter Uhnak <[hidden email]> wrote:
Hi,

is the class-side "name:" setter used by the system itself?
Because I remember many times overriding it for my own needs and it never broke anything as far as I know... which makes it strange why it even exists (because it is a trap).

Thanks,
Peter


--
Pablo Tesone.
[hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: is class-side name setter used by the system

Marcus Denker-4


On 17 Sep 2018, at 16:23, Marcus Denker <[hidden email]> wrote:



On 17 Sep 2018, at 10:17, [hidden email] wrote:

Hi Peter,
   there is no more #name: in Class (or ClassDescription or Behavior). It is named #setName:
It is only used by the class builder, some class methods and some tests. It could be hidden better if it is still a problem.


yes, we should deprecate name: and only use setName: (that is what it used to be originally anyway)

ah, yes, in Pharo7 this is already done. Just setName: is there, no #name:

Marcus