From: Peter Seibel
Subject: Code formatting question
Date: 
Message-ID: <m3hdtiqiao.fsf@javamonkey.com>
Trivial code formatting question: how do you format a DEFCLASS if the
name and the list of direct superclasses don't fit on a single line?

Allegro's PPRINT gives something like this:

  (defclass monkey-market-account
           (interest-bearing-account check-writing-account)
           (...))


My first inclination was this:

  (defclass monkey-market-account
    (interest-bearing-account check-writing-account)
    (...))

or maybe something like this

  (defclass monkey-market-account
      (interest-bearing-account check-writing-account)
    (...))

or maybe this:

  (defclass monkey-market-account (interest-bearing-account
                                   check-writing-account)
    (...))

Both of the later two are what Emacs's lisp-indent-line function will
give you, depending where you break the line.

Others?

-Peter

-- 
Peter Seibel                                      ·····@javamonkey.com

         Lisp is the red pill. -- John Fraser, comp.lang.lisp

From: ·········@random-state.net
Subject: Re: Code formatting question
Date: 
Message-ID: <cad4jj$d76bq$1@midnight.cs.hut.fi>
Peter Seibel <·····@javamonkey.com> wrote:

>   (defclass monkey-market-account
>       (interest-bearing-account check-writing-account)
>     (...))

>   (defclass monkey-market-account (interest-bearing-account
>                                    check-writing-account)
>     (...))

Either of the above -- whichever looks nicer to me at the particular
moment.

Cheers,

 -- Nikodemus                   "Not as clumsy or random as a C++ or Java. 
                             An elegant weapon for a more civilized time."
From: Peter Seibel
Subject: Re: Code formatting question
Date: 
Message-ID: <m3zn79pysq.fsf@javamonkey.com>
Peter Seibel <·····@javamonkey.com> writes:

> Trivial code formatting question: how do you format a DEFCLASS if the
> name and the list of direct superclasses don't fit on a single line?
>
> Allegro's PPRINT gives something like this:
>
>   (defclass monkey-market-account

Er, that's supposed to be money-market-account. Not that it matters.

-Peter

-- 
Peter Seibel                                      ·····@javamonkey.com

         Lisp is the red pill. -- John Fraser, comp.lang.lisp
From: Rob Warnock
Subject: [OT] Re: Code formatting question
Date: 
Message-ID: <MPWdna_Zv7WsH1fdRVn-iQ@speakeasy.net>
Peter Seibel  <·····@javamonkey.com> wrote:
+---------------
| Peter Seibel <·····@javamonkey.com> writes:
| >   (defclass monkey-market-account
| 
| Er, that's supposed to be money-market-account. Not that it matters.
+---------------

On the other hand, given today's interest rates, putting cash
into a money-market account *is* likely to make one look somewhat
like a monkey...  ;-}  ;-}


-Rob

-----
Rob Warnock			<····@rpw3.org>
627 26th Avenue			<URL:http://rpw3.org/>
San Mateo, CA 94403		(650)572-2607
From: Rahul Jain
Subject: Re: [OT] Re: Code formatting question
Date: 
Message-ID: <87pt84lixu.fsf@nyct.net>
····@rpw3.org (Rob Warnock) writes:

> On the other hand, given today's interest rates, putting cash
> into a money-market account *is* likely to make one look somewhat
> like a monkey...  ;-}  ;-}

But that's not what the monkey-market-account is. It's an account which
holds various monkeys that can be easily traded on the open market. Very
useful for companies that need quick, temporary access to low-skilled
book- and code-writers.

-- 
Rahul Jain
·····@nyct.net
Professional Software Developer, Amateur Quantum Mechanicist
From: Tim Bradshaw
Subject: Re: Code formatting question
Date: 
Message-ID: <fbc0f5d1.0406180156.b440b5f@posting.google.com>
Peter Seibel <·····@javamonkey.com> wrote in message news:<··············@javamonkey.com>...
> 
> Er, that's supposed to be money-market-account. Not that it matters.

You've spoiled things completely now.  `Monkey market' is *such* a good term.
From: André Thieme
Subject: Re: Code formatting question
Date: 
Message-ID: <casic1$4bj$1@ulric.tng.de>
Peter Seibel schrieb:
> Trivial code formatting question: how do you format a DEFCLASS if the
> name and the list of direct superclasses don't fit on a single line?
> 
> Allegro's PPRINT gives something like this:
> 
>   (defclass monkey-market-account
>            (interest-bearing-account check-writing-account)
>            (...))
> 
> 
> My first inclination was this:
> 
>   (defclass monkey-market-account
>     (interest-bearing-account check-writing-account)
>     (...))

Not that I have used defclass before, but to my eyes these two versions 
look good.


Andr�
--
From: Thomas Schilling
Subject: Re: Code formatting question
Date: 
Message-ID: <opr9q479n0trs3c0@news.CIS.DFN.DE>
> Peter Seibel schrieb:
>> Trivial code formatting question: how do you format a DEFCLASS if the
>> name and the list of direct superclasses don't fit on a single line?
>>
>> Allegro's PPRINT gives something like this:
>>
>>   (defclass monkey-market-account
>>            (interest-bearing-account check-writing-account)
>>            (...))
>>
>>
>> My first inclination was this:
>>
>>   (defclass monkey-market-account
>>     (interest-bearing-account check-writing-account)
>>     (...))

Also had this problem ...
I prefer the latter.

But how about:

(defclass monkey-market-account
     (interest-bearing-account check-writing-account)
   (slot1 ...)
   (...))

-- 
      ,,
     \../   /  <<< The LISP Effect
    |_\\ _==__
__ | |bb|   | _________________________________________________
From: Thomas Schilling
Subject: Re: Code formatting question
Date: 
Message-ID: <opr9sc0bsxtrs3c0@news.CIS.DFN.DE>
I myself slightly confused wrote ...

> But how about:
>
> (defclass monkey-market-account
>      (interest-bearing-account check-writing-account)
>    (slot1 ...)
>    (...))

... and then found your original post on google.

-- 
      ,,
     \../   /  <<< The LISP Effect
    |_\\ _==__
__ | |bb|   | _________________________________________________