8
Squeak by Example Andrew Black, Stéphane Ducasse, Oscar Nierstrasz and Damien Pollet with Damien Cassou and Marcus Denker scg . unibe . ch/SBE

Squeak by Example

Embed Size (px)

DESCRIPTION

Squeak by Example. Andrew Black, Stéphane Ducasse, Oscar Nierstrasz and Damien Pollet with Damien Cassou and Marcus Denker scg.unibe.ch/SBE. An Open Source Book. For beginners For teaching … available soon!. scg.unibe.ch/SBE. Getting Started 1. Preface 2. A Quick Tour of Squeak - PowerPoint PPT Presentation

Citation preview

Squeak by Example

Andrew Black, Stéphane Ducasse, Oscar Nierstrasz and Damien Pollet

with Damien Cassou and Marcus Denker

scg.unibe.ch/SBE

An Open Source Book

For beginners

For teaching

… available soon!

scg.unibe.ch/SBE

Topics

Getting Started1. Preface2. A Quick Tour of Squeak3. A First Application4. Syntax in a Nutshell5. Understanding Message Syntax

Developing in Squeak6. The Smalltalk Object Model7. The Squeak Programming Environment8. SUnit9. Basic Classes10. Collections11. Streams12. Morphic

Advanced Squeak13. Classes and MetaclassesFrequently Asked Questions

Planned Chapters …- Metaprogramming- Profiling- Inheritance/Idioms- Exceptions- Concurrency- Dependency Mechanisms- Common Errors- RegEx and SmaCC...

Hands on

Drag the method finder icon out of the Tools drawer at the right of the screen. Type “now” in the top left pane, and <accept> it (or just press the return key). The method finder will display a list of all the method names that contain the substring “now” …

Drag the method finder icon out of the Tools drawer at the right of the screen. Type “now” in the top left pane, and <accept> it (or just press the return key). The method finder will display a list of all the method names that contain the substring “now” …

Examples galore

3 + 4 73 + 4 7

(1 to: 6) union: (4 to: 10) a Set(1 2 3 4 5 6 7 8 9 10)(1 to: 6) union: (4 to: 10) a Set(1 2 3 4 5 6 7 8 9 10)

factorial := [:n | (1 to: n)inject: 1into: [:product :each | product * each ] ].

factorial value: 10 3628800

factorial := [:n | (1 to: n)inject: 1into: [:product :each | product * each ] ].

factorial value: 10 3628800

Automated tests!SUnit tests are generated from LaTeX examples (!)

test114self assert: [ 3 + 4 ] value printString = '7'.

test114self assert: [ 3 + 4 ] value printString = '7'.

3 + 4 73 + 4 7

Open Source means:

PDF download– Free, printable (soon)

Print-on-demand– Lulu.com (soon)

LaTeX sources– Creative Commons 3.0 license– Subversion repository

SqueakSource Projects

Contributions welcome!