Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!sdd.hp.com!decwrl!fernwood!portal!cup.portal.com!Will From: Will@cup.portal.com (Will E Estes) Newsgroups: comp.lang.smalltalk Subject: Please Explain Difference Between $A And 'A' Message-ID: <40923@cup.portal.com> Date: 5 Apr 91 06:25:08 GMT Organization: The Portal System (TM) Lines: 28 In learning Smalltalk, I am finding cases where semantically identical, but logically distinct, object types do not get treated the same. One case is point is the difference between single character objects (e.g., $C) and single character string arrays (e.g., 'C'). The following code, for example, blows up in Smalltalk V/Windows: |c| c: = '3'. c < $3. Ideally, you would like the last expression to return false. But instead string array objects don't seem to like dealing with character objects and the last expression blows up. Being new to Smalltalk, I would like to understand this phenomenon better. Specifically: 1) Is this example evidence of bad implementation on Digitalk's part, or is this considered good Smalltalk style? In other words, should it be a goal in writing Smalltalk methods to make semantically identical things work together. Or does good Smalltalk live by the "separate, but equal" rule? 2) Are there many other instances of this sort of thing in Smalltalk? Maybe someone could review the most common gotchas.... Thanks, Will Estes Internet: Will@cup.portal.com UUCP: apple!cup.portal.com!Will