Why instanceVariableNames is a string and not a more structured collection

I am new to Smalltalk, currently playing with Pharo, and I'm curious to choose a subclass in the message: the instanceVariableNames keyword wants something to respond to the subStrings message. I wonder why he does not expect something more structured, like an array, since a character set is required.

Object subclass: #Experiment instanceVariableNames: #(#foo #bar).

My only guess at this is some historical reason: perhaps not all Smalltalks have arrays or their syntax is very different from the internal message as a subclass. Are there any other explanations?

+5
source share
2 answers

, . , , , . , - .

, Smalltalk-80, . ( { expr1 . expr2 . expr3}, Squeak.

. , Pharo Parser, Scanner... .

+2

All Articles