Archive for the ‘swdev/langs’ Category

Smalltalk is mostly Smalltalk

Friday, March 11th, 2005

Jabbering with someone about “turtles all the way down,” I came across Avi Bryant’s blog entry on language implementations. Acknowledging someone else’s comment that Ruby and Python are at approximately the same level, he asserts that Smalltalk is a level up, because it’s mostly written in Smalltalk.

“Who cares?” I started, but once he went into discussion of tools, I got it. My Smalltalk work is (unfortunately) limited to about 20 months in 1997-98, but it was a singular experience. Among other things, it was the first time I could surf the implementation of my own environment, learning about things like thread schedulers, and finding bugs in the CORBA implementation (David Bell, I miss those days).

Avi appears to work at cincom which I’ve just learned is where ParcPlace-Digitalk Smalltalk ended up. I imagine him (based on 10 minutes surfing his blog; I’m feeling reckless today) to be a wistful Smalltalk guru, and he’s probably right to be: Smalltalk strangely never made it the way it maybe should have. A quick surf for the old products I used (VisualWorks, ENVY, DST, GemStone) is a bumpy ride over a lot of web rubble.

[ed. 2005.03.29: Avi is neither chez cincom nor wistful]

Avi closes:

But really what I’m talking about is a philosophical difference, not a technical one: to Smalltalkers, it’s essential that as much of a system as possible be implemented in Smalltalk, whereas this simply isn’t a priority for the scripting language community, and it’s the priorities rather than the individual implementations that draw me to Smalltalk.

There are currently three comments on that post: Ruby in Ruby is coming, Python in Python is coming, and the current, C-heavy implementations of these languages are already dead slow according to a set of OO benchmarks showing 70X compared to Smalltalk–itself only 3X the benchmark leader C#.NET.

Haskell is Functional

Saturday, September 18th, 2004

Both the Haskell language and functional programming were new to me; I came across both while reading about darcs. From the horse’s mouth:

Haskell is a computer programming language. In particular, it is a polymorphicly typed, lazy, purely functional language, quite different from most other programming languages. The language is named for Haskell Brooks Curry, whose work in mathematical logic serves as a foundation for functional languages. Haskell is based on lambda calculus, hence the lambda we use as a logo.

[…]
A functional program is a single expression, which is executed by evaluating the expression. Anyone who has used a spreadsheet has experience of functional programming. In a spreadsheet, one specifies the value of each cell in terms of the values of other cells.

The same page contrasts functional languages with the imperative languages most of us app programmers are more familiar with: java, C#, etc, and emphasizes the level of abstraction:

This focus on the high-level “what” rather than the low-level “how” is a distinguishing characteristic of functional programming languages.

Another well-known nearly-functional language is the standard database query language SQL. An SQL query is an expression involving projections, selections, joins and so forth. The query says what relation should be computed, without saying how it should be computed. Indeed, the query can be evaluated in any convenient order.

Okay, now I see that SQL and LISP are functional, so it’s not so new to me as I thought.

Is there much Haskell going on? Well, it has a wiki that is getting daily update activity. Though monster.com finds only nine jobs in four companies in the US.

Wikipedia is very helpful; here are articles on functional and imperative programming, and there is also a one-page programming paradigms at-a-glance category page.

I wonder if this is one of Ward Cunningham’s 100 languages?