应该怎样理解 { ...: ...} 这种记法?比如这个例子。
Class {
#name : #DemoCases,
#superclass : #Object,
#category : #'Demo-Core-Cases-OLD'
}
{ #category : #accessing }
DemoCases >> recursiveBlock [
| block |
block := [ block ].
^ block
]
它表示字典吗?我在 Pharo Cheat Sheet 里没有找到这种记法。能在方法体或者 Playground 里使用吗?
从英语翻译·查看原文How should I interpret the notation { ...: ...}? An example:
Class {
#name : #DemoCases,
#superclass : #Object,
#category : #'Demo-Core-Cases-OLD'
}
{ #category : #accessing }
DemoCases >> recursiveBlock [
| block |
block := [ block ].
^ block
]
Does this represent a dictionary? The Pharo Cheat Sheet didn't mention this notation anywhere. Can I use it inside method bodies or Playground?