What does this syntax { ...: ...}
mean? Example:
Class {
#name : #TypExamples,
#superclass : #Object,
#category : #'Typer-Core-Examples-OLD'
}
{ #category : #accessing }
TypExamples >> recursion [
| x |
x := [ x ].
^ x
]
Is it a dictionary? I did not find such syntax in the Pharo Cheat Sheet. Is it legal for Playground and for methods body?
This is not Pharo syntax at all. It is "tonel" format, which is a code storing format. It is composed by chunks of STON (Smalltalk Object Notation, sort of JSON for Pharo) and code itself.
And no, this is not "direct-to-playground" code, you need to use a tool to inject it (like Iceberg or Monticello).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With