From: Ng Pheng Siong
Subject: Good Lisp style
Date: 
Message-ID: <a5dl16$v3d$1@coco.singnet.com.sg>
Hi,

I've been programming Python for a while. For the last year or two, I've
practised some XP: test-first, DTSTTCPW, refactorings.

I find that writing Python in an OO style makes the above XP practices
easy.

I'm now learning CL. I've just read CLisp's CLOS-guide.txt. I downloaded
Alain Picard's unit testing framework and wrote, test-first, some bits of
simple CLOS code; kinda like just dipping my toes in the water.

I want to write more substantial Lisp and I'm looking for pointers to good
Lisp style. Is heavily OO good Lisp style? In particular, I wish to not end
up writing Python in Lisp. 

TIA. Cheers.

-- 
Ng Pheng Siong <····@netmemetic.com> * http://www.netmemetic.com

From: Dr. Edmund Weitz
Subject: Re: Good Lisp style
Date: 
Message-ID: <m3vgclsheg.fsf@bird.agharta.de>
····@madcap.netmemetic.com (Ng Pheng Siong) writes:

> Hi,
> 
> I've been programming Python for a while. For the last year or two, I've
> practised some XP: test-first, DTSTTCPW, refactorings.
> 
> I find that writing Python in an OO style makes the above XP practices
> easy.
> 
> I'm now learning CL. I've just read CLisp's CLOS-guide.txt. I downloaded
> Alain Picard's unit testing framework and wrote, test-first, some bits of
> simple CLOS code; kinda like just dipping my toes in the water.
> 
> I want to write more substantial Lisp and I'm looking for pointers to good
> Lisp style. Is heavily OO good Lisp style? In particular, I wish to not end
> up writing Python in Lisp. 

This page has a couple of links, notably to a presentation by Peter
Norvig and Kent Pitman:

  <http://www.cc.gatech.edu/computing/classes/cs2360/ghall/style/style.html>

I don't think this will answer your question whether heavy use of OO
techniques is good Lisp style or not, though.

Edi.

-- 

Dr. Edmund Weitz
Hamburg
Germany

The Common Lisp Cookbook
<http://cl-cookbook.sourceforge.net/>
From: Ng Pheng Siong
Subject: Re: Good Lisp style
Date: 
Message-ID: <a5j0m8$egv$1@coco.singnet.com.sg>
According to Dr. Edmund Weitz <···@agharta.de>:
> This page has a couple of links, notably to a presentation by Peter
> Norvig and Kent Pitman:
>  
> <http://www.cc.gatech.edu/computing/classes/cs2360/ghall/style/style.html>

Looks good! Thanks for the pointer.


> I don't think this will answer your question whether heavy use of OO
> techniques is good Lisp style or not, though.

I'll just have to figure it out, then. ;-)

Cheers.
-- 
Ng Pheng Siong <····@netmemetic.com> * http://www.netmemetic.com
From: Martin Cracauer
Subject: Re: Good Lisp style
Date: 
Message-ID: <a5dnuk$2h4p$1@counter.bik-gmbh.de>
····@madcap.netmemetic.com (Ng Pheng Siong) writes:

>I find that writing Python in an OO style makes the above XP practices
>easy.

>I'm now learning CL. I've just read CLisp's CLOS-guide.txt. I downloaded
>Alain Picard's unit testing framework and wrote, test-first, some bits of
>simple CLOS code; kinda like just dipping my toes in the water.

>I want to write more substantial Lisp and I'm looking for pointers to good
>Lisp style. Is heavily OO good Lisp style? In particular, I wish to not end
>up writing Python in Lisp. 

Count me as one vote against heavy OO (when using CLOS) being good
style in Common Lisp.

CLOS is only suitable for very high-level objects and "heavy OO" means
to me that everything is OO, which pretty much requires a language
like C++ (not Java).

In Lisp, OO is just one of many possible elegant and
language-supported styles and OO the CLOS-style is on a different
efficiency/expressive power rate than C++ or Java OO style.  Of course
we could have had it all if Dylan-driving forces didn't drop the ball.

As for style, read good source (e.g. CMUCL library), there is plenty
on the net and you will easily be able to tell what you like.  There
is also a book "Lisp style and Design", by Molly M. Miller and Eric
Benson which I liked.

Martin
-- 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Martin Cracauer <········@bik-gmbh.de> http://www.bik-gmbh.de/~cracauer/
FreeBSD - where you want to go. Today. http://www.freebsd.org/
From: Ng Pheng Siong
Subject: Re: Good Lisp style
Date: 
Message-ID: <a5j0q8$35n$1@clematis.singnet.com.sg>
According to Martin Cracauer <········@counter.bik-gmbh.de>:
> CLOS is only suitable for very high-level objects and "heavy OO" means
> to me that everything is OO, which pretty much requires a language
> like C++ (not Java).

Well, I meant "heavy OO" like I've been doing with Python. I haven't done
Java since discovering Python and I'm pretty much C++-illiterate. ;-)


> As for style, read good source (e.g. CMUCL library), there is plenty
> on the net and you will easily be able to tell what you like.  There
> is also a book "Lisp style and Design", by Molly M. Miller and Eric
> Benson which I liked.

Ahh. Thanks.

Cheers.

-- 
Ng Pheng Siong <····@netmemetic.com> * http://www.netmemetic.com
From: Bijan Parsia
Subject: Re: Good Lisp style
Date: 
Message-ID: <Pine.A41.4.21L1.0202271302350.63506-100000@login1.isis.unc.edu>
On 27 Feb 2002, Ng Pheng Siong wrote:

> According to Martin Cracauer <········@counter.bik-gmbh.de>:
> > CLOS is only suitable for very high-level objects and "heavy OO" means
> > to me that everything is OO, which pretty much requires a language
> > like C++ (not Java).
> 
> Well, I meant "heavy OO" like I've been doing with Python. I haven't done
> Java since discovering Python and I'm pretty much C++-illiterate. ;-)

Hmm. In Python you can do some pretty heavy "non-OO" style programming,
modules and functions. Dicts and lists. Nary a class nor a method to be
seen.

Actually, this can be hand, especially if you like that style or it works
well for you for some problem.

I think this is *especially* true for Lisp, too. Go ahead, OO your brains
out. Why not? The OO system is *terrific*, I mean *really* cool. You could
use almost nothing else and still have a good time with Lisp.

It's probably less "damaging" to start learning CL by CLOS immersion than
it is by list obsession.

Lisp: There is More Than One Interesting, Profound Way to Do It.

Cheers,
Bijan Parsia.
From: Michael Parker
Subject: Re: Good Lisp style
Date: 
Message-ID: <9D040A5DF211336F.B63026C409FA21B4.C3C2CE91CF726C6A@lp.airnews.net>
> I want to write more substantial Lisp and I'm looking for pointers to good
> Lisp style. Is heavily OO good Lisp style? In particular, I wish to not end
> up writing Python in Lisp.

My lisp varies, but nowadays a fair bit of it is "heavy" O-O.  Lots of
it
is pretty heavily functional too, it all depends on the problem.

Lisp supports so many paradigms so well that just about anything is good
lisp style.

Except for hungarian notation :-)