Jump to content

Add a variable to a class instance at runtime: Difference between revisions

m
(→‎{{header|Smalltalk}}: Questioned incorrect allegation)
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 methodsvariables to the class, not the instance.}}
<lang smalltalk>Object subclass: #Monkey
instanceVariableNames: 'aVar'
Anonymous user
Cookies help us deliver our services. By using our services, you agree to our use of cookies.