Edit | Rename | Changes | History | Upload | Download | Back to Top |
a=b | a.equals(b) |
a==b | a==b |
f := Foo new | Foo f = new Foo() |
printString or asString (VAST) or displayString (VW) | toString() |
but translation of mindset. Below, and in the pages linked to, I outline what I see as the key ideas to get across (the key obstacles to overcome) when selling Smalltalk to programmers experienced in statically-typed languages.
The main necessity when helping Java programmers (or programmers in C, C++ or any other curly-bracket language) to understand Smalltalk is to make them aware from the beginning that there are a succession of things to learn, each step enabling the next. Start with two diagrams: in one, a series of steps:
new polymorphic coding patterns | |||||
new dynamic type system | |||||
new coding cycle, not code-compile-debug | |||||
new browsers | |||||
new IDE + config mgmnt; �Source code in files? How quaint!� | |||||
new code syntax |
make a staircase up which the programmer strides towards golden sunlit uplands of new productivity. In the other, these same steps are piled directly one on top of the other, making a wall over which the unhappy programmer vainly tries to climb to reach the world of new productivity on the far side.
new polymorphic coding patterns |
new dynamic type system |
new coding cycle, change to code-compile-debug cycle |
new browsers |
new IDE + config mgmnt; �Source code in files? How quaint!� |
new code syntax |
The first message must be that whether you think Smalltalk wonderful or awful will depend initially on whether you learn it the first way or the second way, and that your attitude is part of how you learn it.
A second message is that experienced Java, C++ and C programmers may actually find this prescription harder to follow than newcomers, since they have already taken some steps up a different staircase and, without consciously realizing it, may start by (mis)judging a Smalltalk step as the next step up the staircase they know, and then, confronted by the need to generalise some of their programming assumptions, mistakenly overestimate the difficulty of this. Let's see how this works by telling a little story about how
The above was written by Niall Ross. I invite:
Lastly, here are some relevant weblinks:
ChiMu's one-page summary of Smalltalk-Java syntax differences
Smalltalk for the Java Programmer written by Stephane Ducasse and Sander Tichelaar
An interesting series of articles that really helped me 'get' the Smalltalk approach Ron Jeffries at XProgramming (start at Discovering better code)
Edit | Rename | Changes | History | Upload | Download | Back to Top |