Reputation: 101
I am trying to introduce some PHP developers Smalltalk.
I seem to remember that the old Pharo website had a link to a Pharo Smalltalk Quick Reference card. If you printed it out it would print on a 8.5 x 11 page - front and back. I can't seem to find this link anymore. Does anyone know where to find this?
Upvotes: 4
Views: 2540
Reputation: 457
They sure love to brag about that postcard, but heaven help finding anything but a blurred .png
version of it on their website!
Here's the double-sided Pharo Smalltalk cheat sheet / quick reference:
P.S. This is from where I found them, in case there is an updated version in the future.
Upvotes: 1
Reputation: 5125
This post is probably what you are looking for. It seems unclear who the original author is or which version (there seem to be multiple ones) is the original one. See also this thread on the pharo-dev mailing list for a recent discussion on the topic (you'll find more references in that thread).
I'm copying the postcard code from that post here for completeness:
exampleWithNumber: x
"A method that illustrates every part of Smalltalk method syntax
except primitives. It has unary, binary, and keyboard messages,
declares arguments and temporaries, accesses a global variable
(but not an instance variable), uses literals (array, character,
symbol, string, integer, float), uses the pseudo variables
true, false, nil, self, and super, and has sequence, assignment,
return and cascade. It has both zero argument and one argument blocks."
| y |
true & false not & (nil isNil) ifFalse: [self halt].
y := self size + super size.
#($a #a "a" 1 1.0)
do: [ :each |
Transcript show: (each class name);
show: ' '].
^x < y
Upvotes: 5