Hi - While Iâm sure everyone can give you an answer - itâs more useful to teach you how to answer these questions for your self. Try right clicking with your cursor on asString and choose âimplementors ofâ (it may have a slightly different name friending on Pharo version - or press âmetaâ-m. Do the same for printString and compare the results. Also, do the same using âsenders ofâ (meta-n). Most code in Pharo is explorable like this, and you can generally answer most questions by seeing his other code in the system interacts or uses what you are exploring. Tim Sent from my iPhone
On 13 Oct 2019, at 11:50, Samuel Teixeira Santos <arcanosam@gmail.com> wrote:
Hi folks. I'm starting in Pharo studies by FUN Mooc. In Week 03, on An Overview of Essential Collections there is the example below:
| days | days := Dictionary new.
days at: #January put: 31; at: #February put: 28; at: #March put: 31.
days keysAndValuesDo: [ :k :v | Transcript show: k asString, ' has ', v printString, ' days' ; cr ]
The code in blue I change for
days keysAndValuesDo: [ :k :v | Transcript show: k asString, ' has ', v asString, ' days' ; cr ]
And works too on Playground.
There is something different about both? There is someone better than other?
Thanks in advance,
Samuel T. Santos