4 ms·
Have we not realised that the future of programming languages is likely to be increasingly functional? What does SmallTalk do to restrict side effects, to supp
by pattynatty 14y ago
Have we not realised that the future of programming languages is likely to be increasingly functional?
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?
- flyinRyan 14y agoAs OO languages go, Smalltalk is very functional. The way Clojure works would be at least as natural in a Smalltalk language.
- fusiongyro 14y agoIt's Smalltalk, not SmallTalk. 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.
- chimeracoder 14y ago> Have we not realised that the future of programming languages is likely to be increasingly functional? 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.
- shaunxcode 14y agoOne of my pet thought projects is actually to imagine what an immutable smalltalk look like. It seems to me that a simple DSL to provide a smalltalk veneer on top of clojure/datomic is worth exploring.. but I've already said too much.
- chimeracoder 14y ago> One of my pet thought projects is actually to imagine what an immutable smalltalk look like. 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.