Add a variable to a class instance at runtime: Difference between revisions
Content deleted Content added
→{{header|Smalltalk}}: Questioned incorrect allegation |
m →{{header|Smalltalk}}: typo |
||
Line 401:
=={{header|Smalltalk}}==
{{incorrect|Smalltalk|It extends the class (adds a new instance var and new method that will exists even in brand new future instances of that class), not only the particular instance. -- The description of the problem must be reworded then, as it
asks for adding
<lang smalltalk>Object subclass: #Monkey
instanceVariableNames: 'aVar'
|