Smalltalk Written as C

For the problems on Project Euler, several times I've notice myself or others' solutions that involve a huge chunk of text in workspace:

| answer primes sieve testBlock |
primes := ...
primes sortBy...
testBlock := [:a :b | ...

With the easy problems in the beginning, these make sense since they can be solved in a few lines, however keeping this habit until problem 50 is undesirable - blocks and iteration are very inefficient in Smalltalk, message sends are optimized. Its better to make small methods in the Integer/Collection classes, create test methods, and then have one or two lines in a workspace that solves the problem. Smalltalk makes a poor C programming environment.

Posted by John Borden link