by pattynatty · 14y ago · 0 comments
What does SmallTalk do to restrict side effects, to support emerging NUMA architectures, lack of cache coherency, parallelism etc that we are looking at working with more and more at all levels?
I would hate to live in a world in which people do functional programming because they heard on a forum somewhere that it is the future, rather than because they understand the benefits and tradeoffs and have chosen functional programming intentionally. The problems you're describing aren't universally relevant.
I strongly doubt that the big programming languages of the future are going to be as homogeneous as the big languages of the past.
Honestly, Haskell as it stands comes pretty close.
I assume you're talking about pure immutability (for which Haskell is famous), and Smalltalk's message-passing is really just a way of currying functions (with a slightly different syntax).
You could probably stitch something simple together with Haskell + Parsec fairly easily.
Next to the Lisp dialects (and perhaps Haskell), Smalltalk is by far the most transparently functional language I can think of.
Smalltalk is really easy to pick up if you're familiar with the lambda calculus (whether in theory, or via a Lisp or Haskell). Just think: object <-> closure/higher-order function; messages <-> functions; chaining messages <-> currying functions.
The wrapping/syntactic sugar around the functional counterparts in Smalltalk is pretty transparent, by design.
EDIT To expand on that, Alan Kay (the "inventor" of object-oriented programming) has said that Smalltalk is one of the only two truly object-oriented languages that he's ever seen.
The other? Scheme (a Lisp)! So just because Smalltalk is "purely OO" doesn't mean it can't be as functional as a Lisp at the same time.