Mike Austin's Blog

Sunday, November 26, 2006

F-Script and Smalltalk

I like the ideas behind Smalltalk a lot, but sometimes the syntax feels a little terse. I didn't know that F-Script introduced collection oriented methods like this:

Smalltalk:
(employees select:[: anEmployee | anEmployee age > 30])
collect:[: anEmployee | anEmployee name]
F-Script:
employees name at: employees age > 30
http://www.smalltalk.org/articles/article_20040920_a4.html

It looks like this is simply a redefinition of methods and a little use of doesNotUnderstand:, so it should be possible in plain Smalltalk. Right?