(Smalltalk > you) ifTrue: [self postTo: LiveJournal].

Jan 12, 2007 00:53

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... )

Leave a comment

tilton January 12 2007, 17:16:37 UTC
Yay Smalltalk! I used to do a bit of it back in the day, but it's been a long, long time.

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

dour January 12 2007, 18:01:04 UTC
You're not the only person who's suggested that I check out Ruby. Thing is, Ruby is an interpreted language; Smalltalk runs on a JIT VM, and these days you can package the whole deal in an executable, not to mention that all the Windows APIs have been packaged for Smalltalk. (Including DirectX. Vista's nearly done, even.) Also, Ruby cleaves to C/Java-ish syntax (curly braces, dots for message designation, etc.) which I'm really getting happy about not having to deal with! :D

All of your examples are identically short in Smalltalk, too. :)

Reply

tilton January 12 2007, 18:20:32 UTC
Oh, I'm not implying it's better than smalltalk. I'm just saying it's useful to have in your toolkit :) They're both very fun languages!

Reply

dour January 12 2007, 18:41:50 UTC
I'm not implying it's worse, just explaining why I picked the one I picked. ;)

Reply

tilton January 12 2007, 19:00:01 UTC
Also, dang I wish Dolphin were available for OS X. All we've got is Squeak, which is not very programmer friendly.

I guess I could fire up Parallels and see how it runs under that.

Reply

dour January 12 2007, 19:25:36 UTC
Isn't Cincom Smalltalk available for Mac? And I know I saw one Mac-specific one... ah! Ambrai.

Don't I remember Smalltalk being officially endorsed by Apple at some point?

Reply

dour January 12 2007, 19:28:09 UTC
Addendum: Parallels is a Windows emulator? I'm running Dolphin on an old IBM server with dual 866MHz P3s. If you've got a smokin' new Core Duo Mac, it should run just peachy.

Reply

tilton January 12 2007, 20:42:44 UTC
It turns out it runs very well indeed! I'm quite pleased. (Parallels in general has about a 5% to 10% slowdown over native system performance, which really ain't bad if you think about it. I love the modern age.)

Reply

dour January 12 2007, 22:45:07 UTC
Hooray for convergent hardware!

Reply


Leave a comment

Up