I’m taking a computer science class this semester called “Concepts of Programming Languages” from Dr. Phil Windley. We’ll be using the Scheme language as a tool to explore language features and concepts.

Since I am most familiar with another dynamic, late-bound language (Ruby), of particular interest to me is how Scheme and Ruby differ. Here are some notes so far:

  • Macros: There is no way to create a true macro in Ruby. For example, one cannot create an “if” function, or an “and” operator—these are embedded in and defined by the language itself.
  • Speed: Scheme is about 30 times faster than Ruby, if my sources are correct. On a scale that sets the speed of C at 1.0, Dr. Windley (as an estimate) put Scheme at 2 or 3, Java at 5 or 6, and Ruby at 30. Ouch.
  • OO: Ruby is an object-oriented scripting language. It doesn’t have to be, I suppose, but it is used most powerfully when its OO features are embraced. Scheme, on the other hand, is not inherently object oriented. However, from what I understand, because it has nested scope and closures, it is possible to use it in an OO way (I have yet to understand this properly).

I also recommend this discussion thread on Ruby vs. Scheme which was recently highlighted on dzone.com.

With speed, deployment and concurrency all becoming important elements of my programming requirements, I’m excited to take a look at other languages and see what they have to offer. Scheme is one that looks to be enlightening.

I can’t wait ’til we really dig into macros :)