[Pharo-project] What is an abstract method?
Hi! Apparently, the following method is abstract: ArrayedCollection>>add: newObject self shouldNotImplement If I evaluate: (ArrayedCollection>>#add:) isAbstract => true This is not quite right. A method that is cancelled is not abstract. I propose to change CompiledMethod>>abstractMarkers ^ #(subclassResponsibility shouldNotImplement) into CompiledMethod>>abstractMarker ^ #shouldNotImplement Does it make sense? Cheers, Alexandre -- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
On Tue, Sep 13, 2011 at 10:52 AM, Alexandre Bergel <alexandre.bergel@me.com>wrote:
Hi!
Apparently, the following method is abstract:
ArrayedCollection>>add: newObject self shouldNotImplement
If I evaluate: (ArrayedCollection>>#add:) isAbstract => true
This is not quite right. A method that is cancelled is not abstract.
I propose to change CompiledMethod>>abstractMarkers ^ #(subclassResponsibility shouldNotImplement)
into CompiledMethod>>abstractMarker ^ #shouldNotImplement
CompiledMethod>>abstractMarker ^ #subclassResponsibility no?
Does it make sense?
Cheers, Alexandre -- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
-- best, Eliot
The definition of what is considered an abstract class/method highly depends on the point of view. Therefor I have repeatedly argued that it is a very bad idea to have ClassDescription>>#isAbstractClass, Class>>#isAbstractClass, MetaClass>>isAbstractClass, and CompiledMethod>>#isAbstract. I don't see any users of these methods in my image, everybody correctly implements his own. Lukas On 13 September 2011 20:32, Eliot Miranda <eliot.miranda@gmail.com> wrote:
On Tue, Sep 13, 2011 at 10:52 AM, Alexandre Bergel < alexandre.bergel@me.com> wrote:
Hi!
Apparently, the following method is abstract:
ArrayedCollection>>add: newObject self shouldNotImplement
If I evaluate: (ArrayedCollection>>#add:) isAbstract => true
This is not quite right. A method that is cancelled is not abstract.
I propose to change CompiledMethod>>abstractMarkers ^ #(subclassResponsibility shouldNotImplement)
into CompiledMethod>>abstractMarker ^ #shouldNotImplement
CompiledMethod>>abstractMarker ^ #subclassResponsibility no?
Does it make sense?
Cheers, Alexandre -- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
-- best, Eliot
-- Lukas Renggli www.lukas-renggli.ch
On 13 September 2011 19:52, Alexandre Bergel <alexandre.bergel@me.com> wrote:
Hi!
Apparently, the following method is abstract:
ArrayedCollection>>add: newObject     self shouldNotImplement
If I evaluate: (ArrayedCollection>>#add:) isAbstract => true
This is not quite right. A method that is cancelled is not abstract.
I propose to change CompiledMethod>>abstractMarkers     ^ #(subclassResponsibility shouldNotImplement)
into CompiledMethod>>abstractMarker     ^ #shouldNotImplement
Does it make sense?
yes
Cheers, Alexandre -- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel  http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
-- Best regards, Igor Stasenko.
http://code.google.com/p/pharo/issues/detail?id=4798 A slice is in the inbox Alexandre On 14 Sep 2011, at 08:20, Igor Stasenko wrote:
On 13 September 2011 19:52, Alexandre Bergel <alexandre.bergel@me.com> wrote:
Hi!
Apparently, the following method is abstract:
ArrayedCollection>>add: newObject self shouldNotImplement
If I evaluate: (ArrayedCollection>>#add:) isAbstract => true
This is not quite right. A method that is cancelled is not abstract.
I propose to change CompiledMethod>>abstractMarkers ^ #(subclassResponsibility shouldNotImplement)
into CompiledMethod>>abstractMarker ^ #shouldNotImplement
Does it make sense?
yes
Cheers, Alexandre -- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
-- Best regards, Igor Stasenko.
-- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
On Wed, Sep 14, 2011 at 1:20 PM, Igor Stasenko <siguctua@gmail.com> wrote:
On 13 September 2011 19:52, Alexandre Bergel <alexandre.bergel@me.com> wrote:
Hi!
Apparently, the following method is abstract:
ArrayedCollection>>add: newObject self shouldNotImplement
If I evaluate: (ArrayedCollection>>#add:) isAbstract => true
This is not quite right. A method that is cancelled is not abstract.
I propose to change CompiledMethod>>abstractMarkers ^ #(subclassResponsibility shouldNotImplement)
into CompiledMethod>>abstractMarker ^ #shouldNotImplement
Does it make sense?
yes
Why? It doesn't for me. A method defined as ^ self subclassResponsibility is "abstract" from my point of view.
Cheers, Alexandre -- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
-- Best regards, Igor Stasenko.
-- Mariano http://marianopeck.wordpress.com
2011/9/14 Mariano Martinez Peck <marianopeck@gmail.com>:
On Wed, Sep 14, 2011 at 1:20 PM, Igor Stasenko <siguctua@gmail.com> wrote:
On 13 September 2011 19:52, Alexandre Bergel <alexandre.bergel@me.com> wrote:
Hi!
Apparently, the following method is abstract:
ArrayedCollection>>add: newObject     self shouldNotImplement
If I evaluate: (ArrayedCollection>>#add:) isAbstract => true
This is not quite right. A method that is cancelled is not abstract.
I propose to change CompiledMethod>>abstractMarkers     ^ #(subclassResponsibility shouldNotImplement)
into CompiledMethod>>abstractMarker     ^ #shouldNotImplement
Does it make sense?
yes
Why? It doesn't for me. A method defined as ^ self subclassResponsibility is "abstract" from my point of view.
See Eliot's mail, he already noticed the inversion. It's just a copy/paste type, the inbox/SLICE seems correct Nicolas
Cheers, Alexandre -- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel  http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
-- Best regards, Igor Stasenko.
-- Mariano http://marianopeck.wordpress.com
2011/9/14 Nicolas Cellier <nicolas.cellier.aka.nice@gmail.com>:
2011/9/14 Mariano Martinez Peck <marianopeck@gmail.com>:
On Wed, Sep 14, 2011 at 1:20 PM, Igor Stasenko <siguctua@gmail.com> wrote:
On 13 September 2011 19:52, Alexandre Bergel <alexandre.bergel@me.com> wrote:
Hi!
Apparently, the following method is abstract:
ArrayedCollection>>add: newObject     self shouldNotImplement
If I evaluate: (ArrayedCollection>>#add:) isAbstract => true
This is not quite right. A method that is cancelled is not abstract.
I propose to change CompiledMethod>>abstractMarkers     ^ #(subclassResponsibility shouldNotImplement)
into CompiledMethod>>abstractMarker     ^ #shouldNotImplement
Does it make sense?
yes
Why? It doesn't for me. A method defined as ^ self subclassResponsibility is "abstract" from my point of view.
See Eliot's mail, he already noticed the inversion. It's just a copy/paste type, the inbox/SLICE seems correct
s/type/typo/
Nicolas
Cheers, Alexandre -- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel  http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
-- Best regards, Igor Stasenko.
-- Mariano http://marianopeck.wordpress.com
On Wed, Sep 14, 2011 at 11:13 AM, Nicolas Cellier < nicolas.cellier.aka.nice@gmail.com> wrote:
2011/9/14 Nicolas Cellier <nicolas.cellier.aka.nice@gmail.com>:
2011/9/14 Mariano Martinez Peck <marianopeck@gmail.com>:
On Wed, Sep 14, 2011 at 1:20 PM, Igor Stasenko <siguctua@gmail.com>
wrote:
On 13 September 2011 19:52, Alexandre Bergel <alexandre.bergel@me.com> wrote:
Hi!
Apparently, the following method is abstract:
ArrayedCollection>>add: newObject self shouldNotImplement
If I evaluate: (ArrayedCollection>>#add:) isAbstract => true
This is not quite right. A method that is cancelled is not abstract.
I propose to change CompiledMethod>>abstractMarkers ^ #(subclassResponsibility shouldNotImplement)
into CompiledMethod>>abstractMarker ^ #shouldNotImplement
Does it make sense?
yes
Why? It doesn't for me. A method defined as ^ self subclassResponsibility is "abstract" from my point of view.
See Eliot's mail, he already noticed the inversion. It's just a copy/paste type, the inbox/SLICE seems correct
s/type/typo/
:) :) :)
Nicolas
Cheers, Alexandre -- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
-- Best regards, Igor Stasenko.
-- Mariano http://marianopeck.wordpress.com
-- best, Eliot
2011/9/14 Eliot Miranda <eliot.miranda@gmail.com>:
On Wed, Sep 14, 2011 at 11:13 AM, Nicolas Cellier <nicolas.cellier.aka.nice@gmail.com> wrote:
2011/9/14 Nicolas Cellier <nicolas.cellier.aka.nice@gmail.com>:
2011/9/14 Mariano Martinez Peck <marianopeck@gmail.com>:
On Wed, Sep 14, 2011 at 1:20 PM, Igor Stasenko <siguctua@gmail.com> wrote:
On 13 September 2011 19:52, Alexandre Bergel <alexandre.bergel@me.com> wrote:
Hi!
Apparently, the following method is abstract:
ArrayedCollection>>add: newObject     self shouldNotImplement
If I evaluate: (ArrayedCollection>>#add:) isAbstract => true
This is not quite right. A method that is cancelled is not abstract.
I propose to change CompiledMethod>>abstractMarkers     ^ #(subclassResponsibility shouldNotImplement)
into CompiledMethod>>abstractMarker     ^ #shouldNotImplement
Does it make sense?
yes
Why? It doesn't for me. A method defined as ^ self subclassResponsibility is "abstract" from my point of view.
See Eliot's mail, he already noticed the inversion. It's just a copy/paste type, the inbox/SLICE seems correct
s/type/typo/
:) :) :)
Yep, me too... Note for next visit to the doctor: Remind to check some neural connections and probe for a left/right hand inversion.
Nicolas
Cheers, Alexandre -- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel  http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
-- Best regards, Igor Stasenko.
-- Mariano http://marianopeck.wordpress.com
-- best, Eliot
On 14 September 2011 19:04, Mariano Martinez Peck <marianopeck@gmail.com> wrote:
On Wed, Sep 14, 2011 at 1:20 PM, Igor Stasenko <siguctua@gmail.com> wrote:
On 13 September 2011 19:52, Alexandre Bergel <alexandre.bergel@me.com> wrote:
Hi!
Apparently, the following method is abstract:
ArrayedCollection>>add: newObject     self shouldNotImplement
If I evaluate: (ArrayedCollection>>#add:) isAbstract => true
This is not quite right. A method that is cancelled is not abstract.
I propose to change CompiledMethod>>abstractMarkers     ^ #(subclassResponsibility shouldNotImplement)
into CompiledMethod>>abstractMarker     ^ #shouldNotImplement
Does it make sense?
yes
Why? It doesn't for me. A method defined as ^ self subclassResponsibility is "abstract" from my point of view.
To make it clear, i thinking that: #subclassResponsibility is abstract #shouldNotImplement is concrete (and actually completely opposite to 'abstract', because it prohibits subclasses from overriding this method, while #subclassResponsibility doest opposite - it tells that subclasses _should_ override this method, unless they are abstract. -- Best regards, Igor Stasenko.
I proposed a slice for this. Alexandre On 15 Sep 2011, at 08:55, Igor Stasenko wrote:
On 14 September 2011 19:04, Mariano Martinez Peck <marianopeck@gmail.com> wrote:
On Wed, Sep 14, 2011 at 1:20 PM, Igor Stasenko <siguctua@gmail.com> wrote:
On 13 September 2011 19:52, Alexandre Bergel <alexandre.bergel@me.com> wrote:
Hi!
Apparently, the following method is abstract:
ArrayedCollection>>add: newObject self shouldNotImplement
If I evaluate: (ArrayedCollection>>#add:) isAbstract => true
This is not quite right. A method that is cancelled is not abstract.
I propose to change CompiledMethod>>abstractMarkers ^ #(subclassResponsibility shouldNotImplement)
into CompiledMethod>>abstractMarker ^ #shouldNotImplement
Does it make sense?
yes
Why? It doesn't for me. A method defined as ^ self subclassResponsibility is "abstract" from my point of view.
To make it clear, i thinking that: #subclassResponsibility is abstract
#shouldNotImplement
is concrete (and actually completely opposite to 'abstract', because it prohibits subclasses from overriding this method, while #subclassResponsibility doest opposite - it tells that subclasses _should_ override this method, unless they are abstract.
-- Best regards, Igor Stasenko.
-- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
participants (6)
-
Alexandre Bergel -
Eliot Miranda -
Igor Stasenko -
Lukas Renggli -
Mariano Martinez Peck -
Nicolas Cellier