We are trying to find examples of variableSubclass:... and with source code we could not find them. Even looking in all the code did not work. finally Object allSubclasses select: #isVariable worked but it would be good that search to the code would take into account classdefinitions. Or may be it does. Stef and Luc working on the Pharo Mooc
We tried (Object allSubclasses select: #isVariable) reject: [ :each | each instVarNames isEmpty ] and we discovered that we have no class in the system with named instance variables and indexed ones. May be we are wrong. We are interested if you find one. Now we created one Object variableSubclass: #PPpoint instanceVariableNames: 'x y' classVariableNames: '' package: 'Web' and this is strange because inspecting PPoint new: 3 looks wrong since the variable zone arrives before the named one as displayed.
BlockClosure and Context. Back in the day OrderedCollection was one (when become was cheap there was no need for the array inst car). You want to say Smalltalk allClasses select: [:c| c isVariable and: [c instSize > 0]] _,,,^..^,,,_ (phone)
On Jan 9, 2016, at 1:24 PM, stepharo <stepharo@free.fr> wrote:
We tried
(Object allSubclasses select: #isVariable) reject: [ :each | each instVarNames isEmpty ]
and we discovered that we have no class in the system with named instance variables and indexed ones. May be we are wrong. We are interested if you find one.
Now we created one
Object variableSubclass: #PPpoint instanceVariableNames: 'x y' classVariableNames: '' package: 'Web'
and this is strange because inspecting PPoint new: 3 looks wrong since the variable zone arrives before the named one as displayed.
<hhbahgba.>
Le 10/1/16 01:56, Eliot Miranda a écrit :
BlockClosure and Context. Back in the day OrderedCollection was one (when become was cheap there was no need for the array inst car). Yes I remember in VW.
You want to say
Smalltalk allClasses select: [:c| c isVariable and: [c instSize > 0]]
_,,,^..^,,,_ (phone)
On Jan 9, 2016, at 1:24 PM, stepharo <stepharo@free.fr> wrote:
We tried
(Object allSubclasses select: #isVariable) reject: [ :each | each instVarNames isEmpty ]
and we discovered that we have no class in the system with named instance variables and indexed ones. May be we are wrong. We are interested if you find one.
Now we created one
Object variableSubclass: #PPpoint instanceVariableNames: 'x y' classVariableNames: '' package: 'Web'
and this is strange because inspecting PPoint new: 3 looks wrong since the variable zone arrives before the named one as displayed.
<hhbahgba.>
participants (2)
-
Eliot Miranda -
stepharo