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
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."
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
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
····@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
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.
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�
--
> 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| | _________________________________________________
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| | _________________________________________________