Category:Smalltalk: Difference between revisions

Line 505:
(a word to non-Smalltalkers wanting to try the code)
 
Smalltalk code snippets found in Rosetta are usually in the form of expressionexpressions which can be copy-pasted into a so-called "''workspace''" (also called "''playground''" in other systems) which is a kind of REPL-like (read-eval-print-loop) evaluator. The details vary, but usually there is a tool window, into which code can be entered or pasted and evaluated with a menu function called "doIt" or "printIt" (i.e. select the text and apply "doIt").
 
Due to differences in how methods are defined in classes when code is to be imported ("fileIn" or "load code"), these snippets are often expressions which can be evaluated out of a class context, often in a functional style (using blocks).
Anonymous user