Hi Bing,

Yes, any character is allowed in a Symbol. There is even special syntax that 
allows such Symbols to be represented literally.

'a b' asSymbol. 

  => #'a b'

Although it might be confusing, I don't see any problem.

The concept of 'meaning' is defined by the user, the usage, not by the Symbol 
itself. A Symbol with a space cannot be a selector (message/method) name, but 
that does not mean a Symbol with a space could not be useful in some other 
context.

Regards,

Sven

> On 11 Feb 2017, at 05:56, lb <liangbin...@126.com> wrote:
> 
> Hi,
> I know Symbol is subclass of String.        
> Any string object can become symbol object by sending 'asSymbol' message..
> I think  symbol must has its meaning in comon use, so the symbol should be 
> composed of alphabet or number ‘without space“.
> 
> BUT There are not compliant below
> 1.    '     ' asSymbol     >>>>    no meaning
> 2.  '$%%&' asSymbol     >>>>    no meaning
> 3.  'sign' asSymbol = 'sign ' asSymbol   >>>  false because of space.
> 3. '  one two  three ' asSymbol              >>>    I think It should become 
> three symbols = #one, #two, #three
> 
> 
> Mybe my understanding is wrong.
> 
> Bing Liang
> 
> 


Reply via email to