--- 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 ---
Re: [Pharo-users] About asSymbol message , some questions in my mind
Benoit St-Jean via Pharo-users Fri, 10 Feb 2017 21:28:02 -0800
- Re: [Pharo-users] About asSymb... Ben Coman
- Re: [Pharo-users] About asSymb... lb
- Re: [Pharo-users] About as... Ben Coman
- Re: [Pharo-users] About asSymbol messa... Denis Kudriashov
- Re: [Pharo-users] About asSymbol m... Sven Van Caekenberghe
- [Pharo-users] About asSymbol mess... lb
- Re: [Pharo-users] About asSymbol message , ... john pfersich
- [Pharo-users] About asSymbol message , some... lb
- Re: [Pharo-users] About asSymbol messa... Benoit St-Jean via Pharo-users