Squeak by Example - Fosdem08

  • View
    1.850

  • Download
    0

  • Category

    Business

Preview:

DESCRIPTION

Lightning talk (20 min) I gave at Fosdem in february 2008 in Brussels, to announce Squeak by Example and make a little noise around Smalltalk. Resources… - http://www.SqueakByExample.org - Alto pictures from http://ftp.squeak.org/Media/ - the font is Jan Gerner's Yanone Kaffeesatz: http://fonts.info/info/en_yanone-kaffeesatz.htm

Citation preview

Squeakby Example

A. Black, S. Ducasse, O. Nierstrasz,Damien Pollet

www.squeakbyexample.org

“I invented the termObject-Oriented,and I can tell you

I did not have C++ in mind.”

— Alan Kay

Everything isan Object

Objects livein an image

shot with debugger, explorer,workspace

example: aNumber"This is a method that illustrates every part of the Smalltalk method syntax. It has unary, binary, and keyword messages, declares arguments and temporaries, accesses an instance variable and a global variable, uses literals (array, character, symbol, string, integer, float), uses the pseudo variables true, false, nil, self, and super, and has sequence, assignment, return and cascade. It has both zero argument and one argument blocks. It doesn’t do anything useful, though."

| x |true & false not & (nil isNil) ifFalse: [ self halt ].x := y + super size.#( $a #a 'a' 1 1.0 ) do: [ :each |

Transcriptshow: each class name ;show: each printString ].

^ x < aNumber

Method invocationis late bound

Methodsare public

Instance variablesare private

Single inheritance

Garbage collection

Everything iswritten in Smalltalk

Control structuresare just methods

do: aBlock 1 to: self size do: [:index | aBlock value: (self at: index)]

Java for-each (JSR 201)dec. 2002 – sep. 2004

What you need

VM Image

Sources Changes

What you get

3.10 image soonbetter tools

modularizationgreen unit tests

the heretic web framework

✓interactive web applications✓backtracking✓components

– REST and pretty URLs for free– templates

renderContentOn: html html heading: count. html anchor callback: [ self increase ]; with: '++'. html space. html anchor callback: [ self decrease ]; with: '--'

2.8 releasefasterlighter

supported by major Smalltalk vendors: Cincom, Gemstone

GNU Smalltalk

3.0.1 released last monthnew syntax for classes*.star package format

Seaside ported as of last night :-)

getting startedquick tourfirst applicationsyntaxmessages

programmingobjectstoolstestingbasic classes

collectionsstreamsGUImetaclasses

get the PDF or buy the booktry Smalltalk and have fun!

www.squeakbyexample.org

www.squeak.org#squeak on freenode

www.seaside.stsmalltalk.gnu.org

Recommended