More on Smalltalk

ziggy on 2004-09-20T03:35:07

I admit it. I cannot look away from this Smalltalk fallout from Ovid's post.

James Robertson (of Cincom Smalltalk) blogged a response, which elicited a comment from Shane King:

While I'd agree with you that the average perl code has more lexical complexity than the average smalltalk code, I'd guess the average smalltalk code has more conceptual complexity than the average perl code.

I think lexical complexity is easier on most people than conceptual complexity. With perl, sure there's a lot to learn, but it's all pretty simple, and can be learnt by memorisation. On the other hand, while there's not as much to learn syntax wise with smalltalk, there are a number of higher level concepts you wont encounter much (if at all) in most perl code.

It's a double edged sword - higher level concepts are what makes a programming language more productive for experts, but they're also what intimidates newcomers.

This is the simplest and most concise expression I've seen of the difference between languages like C, Perl, etc. vs. Lisp, Scheme, Smalltalk and such. [1]

A few other responses to James' post fall into the "intuitive trap"[2], but a good many more highlight the "Where's my program?" problem innate to image-based Smalltalks.

1: I once heard a Lisp bigot claim that Lisp was easier to learn, because there is no distinction between statements and expressions as in C. In practice, those distinctions take about a nanosecond for most programmers to absorb, which made that line of argument especially hollow.

2: The only intuitive interface is the nipple. All else is learned.


Syntax vs Semantics

btilly on 2004-09-23T15:47:33

I like this quote.

While I'd agree with you that the average perl code has more lexical complexity than the average smalltalk code, I'd guess the average smalltalk code has more conceptual complexity than the average perl code.

This fits well with something that I've said before. There is a certain amount of complexity to be expressed. It can be divided in different ways between syntax and the semantics of your computing model. The advantage of pushing things to syntax is that people come hardwired with an ability to handle a certain amount of grammar. The advantage of pushing things to semantics is that you make it easier to manipulate the way that you manipulate your language. That is, it is easier to engage in "meta-programming" of some form. It is usually harder while working in a language to rewrite the syntax that it accepts. (Well, Perl is pushing in that direction - we'll see what happens with rewritable grammars in Perl 6.)

I note with interest that languages which people think of as "academic" tend to choose the abstraction of semantic content over syntax. Perl, obviously, makes the opposite choice. Perl may go too far, but in my view it is good to recognize the quirks of how human brains work, and leverage off of that.

Re:Syntax vs Semantics

chromatic on 2004-09-23T16:05:34

Perhaps the people drawn to create and use academic languages are more comfortable expressing their languages in the context of algebraic expressions. There's certainly something similar about the desire to move from first principles to highly-derived theorems.