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... )
Comments 14
i bet that it is possible in lisp ( with macros or something?)
Reply
Reply
Reply
Reply
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 ( ... )
Reply
All of your examples are identically short in Smalltalk, too. :)
Reply
Reply
Reply
Reply
Leave a comment