ByteSymbol >> #species = String ?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

ByteSymbol >> #species = String ?

Frank Shearar-3
Why would this be? I mean, it has Andreas' initials on it so I presume
there's good reason.

It means that #foo, '1' returns 'foo1', not #foo1.

(This is why the ClassFactoryForTestCase-using tests are all failing.
The fix for the tests is in SUnit-fbs.94.)

frank

Reply | Threaded
Open this post in threaded view
|

Re: ByteSymbol >> #species = String ?

Bob Arning-2
Pretty much for that reason. #species allows some collection methods to return a more general type if the specific type might not yield expected or pleasant results. E.g.

#f00,var1,' ',var2,' = ',var3

would produce lots of intermediate symbols with the associated overhead when a string result is more likely the desired result.

BTW, Andreas simply moved the existing Symbol>>species into ByteSymbol and WideSymbol when they entered Squeak. The original use is much older.

Cheers,
Bob

On 4/5/13 8:40 AM, Frank Shearar wrote:
Why would this be? I mean, it has Andreas' initials on it so I presume
there's good reason.

It means that #foo, '1' returns 'foo1', not #foo1.

(This is why the ClassFactoryForTestCase-using tests are all failing.
The fix for the tests is in SUnit-fbs.94.)

frank