This post originated from an RSS feed registered with Agile Buzz
by James Robertson.
Original Post: Smalltalk features
Feed Title: David Buck - Blog
Feed URL: http://www.cincomsmalltalk.com/rssBlog/buck-rss.xml
Feed Description: Smalltalk can do that
I intended to post this article on some newsgroups as part of a "discussion" on Smalltalk vs. Java, but since that discussion is really more of a flame war, I decided it would be better to just post it here.
Things Smalltalk has that Java doesn't:
Blocks. Code and the context it runs in can be stored in an object that can be executed at any time later by sending it a message.
Proceedable exceptions - Smalltalk exceptions find and execute the handler before deciding to unwind. This allows the handler to decide to proceed without unwinding.
More direct access to the compiler. In Smalltalk, you can easily write:
Compiler evaluate: '5 squared 4'
which compiles the string, executes the code, and returns a value.
A higher level of reflection. For example, in Smalltalk, it's possible to ask a class for source code for a method then compile the source code into a parse tree and enumerate through the parse tree. This make it possible, for example, to write code to find all methods that take three parameters and send the message foo to the third parameter.
No integer overflow. In Smalltalk, integers are never restricted to a certain number of bits. They always give you back the mathematically correct results for Integers.
Edit and continue. Change code in the debugger then continue execution from there.
An integrated extensible development environment. In Smalltalk, you can easily add extensions to the browser, inspector, debugger, etc. I realize this is possible with Eclipse, but it's a much more difficult task than in Smalltalk.
Those are the things I can come up with off the top of my head.