Registered: Apr, 2003
Re: Are Programmers People? And If So, What to Do About It?
Posted: May 12, 2003 11:21 AM
Howdy, Cees -- hope things are going well.
I suppose we could argue this around till the cows come home (I don't have any, but maybe you do -- otherwise it will be a long talk).
In my experience, there were two standard complaints I heard from people who tried to switch (or get others to switch) from C++ to Smalltalk: the speed and the syntax. The speed issue is really just How Things Were, and no longer really an issue in most cases. But the syntax certainly was off-putting. You will find, I believe, that almost every procedural language still left standing has an Algol-derived syntax. Whether this is appeals to an inbred human tendency or simply to what people have come to expect is rather irrelevant: Try putting the hot water tap on the right-hand side of the faucet sometime, or using a screw that turns the other way, and you will discover the power of expectations.
(Okay, "procedural": To some, "procedural" is an intrinsically anti-OO term, but to me, OO languages are all about associating the right combination of procedure and state in order to process a message. So "procedural" is the term I use to contrast the family of Algol, Ada, C, C++, Smalltalk, Basic, Pascal, Java, Perl, C, sh, FORTRAN, etc., with list-based languages, functional languages, visual languages, stack languages, query languages, etc. If you know a better term, tell me, but that's what I mean here. All these terms are necessarily loose, but I hope you get what I mean.)
[i < 10]
whileTrue: [Transcript show: i printString. i := i + 1]
The syntax is clearly consistent -- everything is a message sent to the thing that precedes it ("
[i < 10]" is a block that is sent the "
whileTrue:" message), but it is sort of head-twistingly backwards from the expected "
while (i < 10) ...", even though this syntax works just fine for "
Transcript show: ..." (IMHO, anyway). Why do people expect "
while ..."? I don't think that's very relevant here, my experience is that this is unnatural and offputting.
My strongest exposure to this was when the GOF patterns book came out, which had C++ and Smalltalk in it. The number of people around me who were puzzling out the Smalltalk and being explicitly unhappy about it was pretty high.
Stroustroup got this one right: C was very popular and widespread, and he ran with it. To say Smalltalk got this "wrong" would be rather unfair, as it predated the clarity of this market positioning effect, but it certainly ended up on the wrong side of this line.
Python is largely Algol-like, in fact, C-like. I haven't used Ruby at all, and I don't know what its "market share" is, so I don't know how relevant it is to the point.
Now, how much this has to do with the demise (such as it is) of Smalltalk is a matter of opinion. I just have this programmer-centric view that if programmers had fallen in love with Smalltalk, someone would have satisfied that demand, as has happened with any number of other languages with bad vendor histories (FORTRAN, Lisp, C++ -- hell, even Java has been provided by multiple vendors.) Programmers can write compilers and interpreters, so they would have written their own (as they have) and people would have used those ones instead of the maddened vendors'. That this did not happen seems like fairly strong evidence that it was something else in the way, at least in addition to that problem. Speed was certainly one of those things, but my opinion was that the oddness of the syntax to the mass of programmers was major factor.
And too bad. There is a lot to like in Smalltalk.
As for text vs. non-text languages, I will be more convinced when I see one that is a significant improvement over text-based ones. Clearly for some tasks, graphical interfaces are better, but for flow control especially I have yet to see a graphical-based editing system that was not visually inefficient and unscalable. Maybe I just gave up looking after living with a few and deciding that there was an intrinsic mismatch beyond the small scale, so maybe you'll point me at something worth looking at. It would be a nice surprise.