--- Begin Message ---
It can be useful if you want to save some space in some very specific cases.  
You could have a one million strings 'hello' (hence one million objects) or 
deal transform them into symbols and have only one #hello.  I recall a coworker 
telling me about this ultra-fast string search program in Gemstone where they 
transformed a gazillion duplicate strings into symbols thus using waaaaaaaay 
less memory and speeding up the lookup.
 ----------------- 
Benoît St-Jean 
Yahoo! Messenger: bstjean 
Twitter: @BenLeChialeux 
Pinterest: benoitstjean 
Instagram: Chef_Benito
IRC: lamneth 
Blogue: endormitoire.wordpress.com 
"A standpoint is an intellectual horizon of radius zero".  (A. Einstein)

      From: lb <liangbin...@126.com>
 To: "pharo-users@lists.pharo.org" <pharo-users@lists.pharo.org> 
 Sent: Friday, February 10, 2017 11:59 PM
 Subject: [Pharo-users] About asSymbol message , some questions in my mind
   
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 below1.    '     ' asSymbol     >>>>    no 
meaning2.  '$%%&' asSymbol     >>>>    no meaning3.  'sign' asSymbol = 'sign ' 
asSymbol   >>>  false because of space.3. '  one two  three ' asSymbol          
    >>>    I think It should become three symbols = #one, #two, #three

Maybe my understanding is wrong.
Bing Liang



   

--- End Message ---

Reply via email to