我正在尝试介绍一些PHP开发人员Smalltalk。
我似乎记得旧的Pharo网站有一个链接到Pharo Smalltalk快速参考卡。如果您将其打印出来,它将打印在8.5x11页上-正面和背面。我似乎再也找不到这个链接了。有人知道在哪里可以找到这个吗?
发布于 2014-08-15 13:06:54
This帖子可能就是你要找的。似乎不清楚谁是原始作者,或者哪个版本(似乎有多个)是原始版本。另请参阅pharo-dev邮件列表上的this thread,了解有关该主题的最新讨论(您可以在该帖子中找到更多参考)。
为了完整起见,我从这篇文章中复制了明信片代码:
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发布于 2014-08-15 14:17:29
我想你指的是Flyer Cheat Sheet
发布于 2022-02-17 19:37:02
https://stackoverflow.com/questions/25320090
复制相似问题