Been fiddling about with
Dolphin Smalltalk. I'm really liking this language. I first figured objects out in Java, and they seemed like a great idea, but certain things just seemed more complex than they needed to be. Smalltalk has no such cruft. Most especially, writing a small class does not necessitate writing a header which is larger than the
(
Read more... )
If You Like Smalltalk, You Might Also Like(tm): Ruby. It rifled through Smalltalk's pockets and made off with its block closures, then broke into LISP's house and took some other bits. I'm finding it to be really fun to do things like
# Print "hello, world!" five times
5.times.do { puts "Hello, world!" }
and
# Reverse each name in the list
names.map { |n| n.reverse }
where the things in {}'s are block closures being passed to the 'do' method and the 'each' method, respectively. These are just small built-in toy examples.
And Ruby objects are infinitely extensible at runtime. You can open them, poke them, prod them, define new methods, rename old methods, intercept messages and do highly inappropriate things. It's wonderful.
Of course it loses out by not having the integrated workspace system that Smalltalk has, but it does have a reasonable interactive shell called irb that lets you spit arbitrary Ruby into your system to see what happens.
P.S.: If you're into web development, be sure to check out Seaside, probably the best web app development framework in the world, and unfortunately nobody uses it. It's pure Smalltalk, and it lets you do crazy things in a snap.
Reply
All of your examples are identically short in Smalltalk, too. :)
Reply
Reply
Reply
I guess I could fire up Parallels and see how it runs under that.
Reply
Don't I remember Smalltalk being officially endorsed by Apple at some point?
Reply
Reply
Reply
Reply
Leave a comment