如何理解 Pharo Smalltalk 中的这种语法结构?

Pau*_*-AG 4 smalltalk pharo

这个语法{ ...: ...}是什么意思?示例

Class {
    #name : #TypExamples,
    #superclass : #Object,
    #category : #'Typer-Core-Examples-OLD'
}

{ #category : #accessing }
TypExamples >> recursion [
    | x |
    x := [ x ].
    ^ x
]
Run Code Online (Sandbox Code Playgroud)

是字典吗?我在 Pharo Cheat Sheet 中没有找到这样的语法。Playground 和方法体是否合法?

Est*_*nLM 8

这根本不是 Pharo 语法。它是“tone”格式,这是一种代码存储格式。它由 STON(Smalltalk Object Notation,一种用于 Pharo 的 JSON)和代码本身组成。

不,这不是“直接到游乐场”的代码,您需要使用工具来注入它(如 Iceberg 或 Monticello)。