Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Smalltalk, but not quite

Name: Anonymous 2012-02-20 12:28

A dozen years ago, smalltalk was considered the number one graphical interface language, pretty much defining what is nowadays known as turtle graphics.

Unfortunately, smalltalk has a very old object system, one that is considered ancient today; So I decided to whip out a design for a less verbose object system, one that may be easier to learn.

What do you think?


import System.
import Extra/Qt [QtGui].

class Example uses (QtGui/QWidget) [
    new := [
        super: new.
        self initUI.
    ]

    initUI := [
        self setGeometry: [300, 300, 250, 150].
        self setWindowTitle: "Icon".
        self setWindowIcon: (QtGui/QIcon new: "web.png").
        self show.
    ]
].


define [app, ex]
app := QtGui/QApplication new: System/ARGV.
ex := Example new.
System/Exit: (app: exec).

Name: Anonymous 2012-02-20 12:33

I'm not really familiar with Smalltalk. It looks like both arrays(?) and lambdas(?) can be used as rvalues. How does the parser make the distinction without exponential lookahead blowup?

How does the old object model differ from the new one? What exactly are your improvements? I can't tell what you're trying to do.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List