Exchanging the order of message and receiver in message sends

Place the receiver before the message, as in C++, Java, and real Smalltalk.  That is, use this new syntax for message sends: (receiver message parameters).

Example

Original mSmalltalk code Revised mSmalltalk code
(class Pair Object (x y)
    (method x ( ) x)
    (method y ( ) y)
    (method x: (a) (set x a))
    (method y: (b) (set y b))
    (method min ( ) (if (< x y) [x] [y]))
    (method max ( ) (if (> x y) [x] [y]))
)

(val p (new Pair))
(x: p 1)
(y: p 2)
(x p)            ; 1
(y p)            ; 2
(min p)         ; 1
(max p)        ;
2
(class Pair Object (x y)
    (method x ( ) x)
    (method y ( ) y)
    (method x: (a) (set x a))
    (method y: (b) (set y b))
    (method min ( ) ((x < y) if [x] [y]))
    (method max ( ) ((x > y) if [x] [y]))
)

(val p (Pair new))
(p x: 1)
(p y: 2)
(p x)            ; 1
(p y)            ; 2
(p min)         ; 1
(p max)        ; 2

Permitting method overloading via the number of parameters

Allow multiple methods within the same class to have the same name, provided they have different numbers of parameters.  So, it should now be safe to ignore the convention of using the number of colons in a method name to indicate its number of parameters.

Example

Original mSmalltalk code Revised mSmalltalk code
(class C Object ( )
    (method m ( ) 0)
    (method m: (x) 1)
    (method m:: (x y) 2)
    (method m::: (x y z) 3)
)

(val a (new C))
(m a)             ; 0
(m: a 0)         ; 1
(m:: a 0 0)     ; 2
(m::: a 0 0 0) ; 3
(class C Object ( )
    (method m ( ) 0)
    (method m (x) 1)
    (method m (x y) 2)
    (method m (x y z) 3)
)

(val a (C new))
(a m)          ; 0
(a m 0)       ; 1
(a m 0 0)    ; 2
(a m 0 0 0) ; 3