Lisp refactoring puzzle

gene heskett gheskett at wdtv.com
Tue Jul 12 14:23:39 EDT 2011


On Tuesday, July 12, 2011 02:08:02 PM Terry Reedy did opine:

> On 7/11/2011 11:37 PM, Xah Lee wrote:
> > watch the first episode of Douglas Crockford's talk here:
> >   http://developer.yahoo.com/yui/theater/video.php?v=crockonjs-1
> 
> The link includes a transcript of the talk, which I read
> 
> I suspect Lee likes Crockford because they both think they are smarter
> than everyone else. Writing about Smalltalk, for instance, Crockford
> says:
> 
> "I don't know why it is, but a lot of programmers just couldn't get used
> to this syntax. [everything is done by sending a message with arguments
> to some object] ...So this may be a superior notation, but it was
> profoundly rejected. By who? By us, by the programmers, because we
> couldn't understand it."
> 
> Actually, I and others see Smalltalk as deeply flawed because its
> message passing syntax arbitrarily breaks symmetries in operations. For
> instance, in the expression 'a+b', both operands have equivalent roles
> in the operation for all normal interpretations of '+'.# On the other
> hand, in the expression 'a.extend(b)', where a is a list and b any
> iterable and the result is to mutate a but not b, a and b have very
> different roles in both the operation and the expression that invokes
> it.
> 
> # Under the covers, Python implements 'a+b' as first 'a.__add__(b)', but
> it also tries 'b.__radd__(a)' if the first does not work. This
> introduces a slight asymmetry in that a gets first say at defining the
> meaning of 'a+b', but it does not get the only say. And, as far as I can
> presently remember, this asymmetry is never visible with builtins. In
> fact, this implementation makes it possible for 'a+b' and 'b+a' to both
> give the same answer when a is a builtin and b is a user-class instance.
> 
> Crockford is right that he does not 'know why it is' that not everyone
> loves Smalltalk. He should have stopped there instead of projecting his
> ignorance on everyone else.
> 
I have my own reasons to hate smalltalk but won't elaborate.

> As a side note, the same principle of expressions matching operations in
> symmetry suggest that majority of up are quite sensible and not dumb
> idiots for preferring 'f(x)' to the '(f x)' of Lisp. In a function call,
> the function has a different role than the arguments, so it is
> appropriate that it have a different role in the expression.

Which should be well documented if one expects the programmers to use it 
properly.  So far, I have only found two languages that are adequately 
defined and implemented.  K&R C, and the now essentially defunct Amiga 
ARexx.  But I should preface that by saying that I have not yet adequately 
studied python, one of the reasons I joined this list.

Specifically, I am trying to install the altera quartus software so I can 
program one of their DE1 boards, but because the majority of the linux 
distro's have not kept their repo's zlib packages up to date, one of the 
quartus imports, gzdirect is on the missing list and I am dead in the water 
until I install zlib version 1.2.5.

I hope this list serves me as a tutorial to fill in the gaps of my python 
knowledge which at the moment seem too wide to jump over.  I hope I can ask 
intelligent, if newbie, questions occasionally.

Now, I hate to mention it Terry, but your clock seems to be about 126 
months behind the rest of the world.  Does your system not run ntpd by 
default?  The date in the header from your machine is 
"Mon Jan 1 14:11:11 2001".

Cheers, gene
-- 
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
What makes us so bitter against people who outwit us is that they think
themselves cleverer than we are.



More information about the Python-list mailing list