Good idea!
Stef
Le 8/4/16 09:49, Cyril Ferlicot Delbecque a écrit :
On 08/04/2016 09:05, Henrik Nergaard wrote:
| s1 s2 |
s1 := 1234 asString.
s2 := 1234 asString.
s1 = s2. "true"
s1 == s2. "false"
s1 asSymbol = s2 asSymbol. "true"
s1 asSymbol == s2 asSymbol. "true"
(s1 class allInstances
On 08/04/2016 09:05, Henrik Nergaard wrote:
> | s1 s2 |
>
> s1 := 1234 asString.
> s2 := 1234 asString.
>
> s1 = s2. "true"
> s1 == s2. "false"
>
> s1 asSymbol = s2 asSymbol. "true"
> s1 asSymbol == s2 asSymbol. "true"
>
> (s1 class allInstances select: [:s | s = s1 ]) size. "2"
> (s1 asSymbo
+1
| s1 s2 |
s1 := 1234 asString.
s2 := 1234 asString.
s1 = s2. "true"
s1 == s2. "false"
s1 asSymbol = s2 asSymbol. "true"
s1 asSymbol == s2 asSymbol. "true"
(s1 class allInstances select: [:s | s = s1 ]) size. "2"
(s1 asSymbol class allInstances select: [:s | s = s1 asSymbol ]) size. "1"
[
> On 08 Apr 2016, at 09:19, Damien Cassou wrote:
>
> Henrik Nergaard writes:
>
>> | s1 s2 |
>>
>> s1 := 1234 asString.
>> s2 := 1234 asString.
>>
>> s1 = s2. "true"
>> s1 == s2. "false"
>>
>> s1 asSymbol = s2 asSymbol. "true"
>> s1 asSymbol == s2 asSymbol. "true"
>>
>> (s1 class allInstanc
Henrik Nergaard writes:
> | s1 s2 |
>
> s1 := 1234 asString.
> s2 := 1234 asString.
>
> s1 = s2. "true"
> s1 == s2. "false"
>
> s1 asSymbol = s2 asSymbol. "true"
> s1 asSymbol == s2 asSymbol. "true"
>
> (s1 class allInstances select: [:s | s = s1 ]) size. "2"
> (s1 asSymbol class allInstances sel
@lists.pharo.org] On Behalf Of Ben
Coman
Sent: Friday, April 8, 2016 3:23 AM
To: Any question about pharo is welcome
Subject: Re: [Pharo-users] Pharo-users Question about the symbols
A symbol is like a string, except that all symbols with the same value are in
fact the same object; that is,
On Friday, 8 April 2016, Valentin Ryckewaert
wrote:
> Hello everyone,
>
> i'm learning Pharo and i'm having difficulties to understand the symbols,
> what are they? How are they different of the ByteString ? Why are they
> usefull ?
> Why should I put #string where I can put 'string' ?
>
Hi,
As
And symbols are immutable
Brad
Sent from my iPad
> On Apr 7, 2016, at 9:41 PM, Markus Stumptner wrote:
>
> As a result, internal names (e.g., method names) are usually symbols. Strings
> are normally used for string manipulation, symbols for unambiguous (but
> humanly readable!) internal r
As a result, internal names (e.g., method names) are usually symbols.
Strings are normally used for string manipulation, symbols for
unambiguous (but humanly readable!) internal reference (vulgo 'naming').
Markus
On 08/04/16 10:53, Ben Coman wrote:
A symbol is like a string, except that all
A symbol is like a string, except that all symbols with the same value
are in fact the same object; that is, every #hello symbol is the exact
same object as every other #hello symbol.
See "identically equal" section here...
http://sdmeta.gforge.inria.fr/FreeBooks/ByExample/08%20-%20Chapter%206%20-
Hello everyone,
i'm learning Pharo and i'm having difficulties to understand the symbols,
what are they? How are they different of the ByteString ? Why are they
usefull ?
Why should I put #string where I can put 'string' ?
Thanks in advance for your answer.
Valentin Ryckewaert
11 matches
Mail list logo