Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

printing money in C++ and in Common Lisp

198 views
Skip to first unread message

Erik Naggum

unread,
May 6, 1998, 3:00:00 AM5/6/98
to

the April, 1998 issue of the C/C++ Users Journal has an interesting
piece. (don't ask me how I got it or why I read it.) P.J.Plauger writes
an insanely elaborate article on how to print money values nicely in C++
using advanced new features in the language that very few implement,
something called "facets" and having to do with the horribly kludge they
call "locale". it's part of the Standard C++ Library. of course.

we're treated to a wonderfully eloquent statement of language power, and
I quote:

"The payoff is that the expression statement

cout << showbase << setw(20)
<< internal << setfill('*')
<< Money(123456789.0) << endl;

generates the output

$*******1,234,567.89

Neat, huh?"

yeah. neat. if you _love_ C++. Money is special wrapper class. the
standard template class is called "money_put", which in order to work,
needs some incredibly hairy setup work: 66 lines beyond the above
"beauty", including some cut-and-paste code from elsewhere, because it is
apparently hard to get all the details right. the implementation of the
money_put template class takes 145 lines of unbelievable cruftiness.

so I raised the Lisp Listener window in Allegro CL and I typed:

(format t "~20,'*/dollars/" 123456789/100)

(I posted the DOLLARS function here on 1997-08-12 as a quick response to
a question of formatting money -- it took me mere minutes to write) and,
lo and behold, it generated the output

$*******1,234,567.89

very pleased with my 13-line (plus documentation) function, I just _had_
to use an all-standard FORMAT expression, too, using an integral number
of cents, as in the article:

(multiple-value-call #'format t "$~V,'*:D.~2,'0D" (- 20 4) (floor 123456789 100))

and, voilà, it generated the output

$*******1,234,567.89

OK, so what _is_ wrong with this picture? object-orientation, C++ style.
_that's_ wrong. the article was worth reading to see how fundamentally
screwed-up C++ _people_ are, too. this stuff is ideally suited to a
data-driven design, a miniature "language" that can describe a locale's
conventions succinctly, _without_ using virtual functions to return a
dollar sign, a plus sign, a minus sign, a comma, a decimal point, etc,
but _no_, this is C++. we don't have data, we have code. lots and lots
of code. P.J.Plauger himself laments the tall costs. I can only concur.

if you think I'm exaggerating when I say that C++ is _fundamentally_
ill-designed and is only really suited to unethical programmers, this
article may change your mind. the _code_ may change your mind. that
this crap is part of the Standard C++ Library may change your mind. for
kicks, I have extracted the files from the CUJAPR98.ZIP file at
WWW.CUJ.COM and made the files insert.cpp and money_put.h (cleansed of
DOS line ending CRuft, too, but FTP should add them back if you need
them) available under ftp.naggum.no:/pub. (copyright in that code is
assumed to remain with P.J.Plauger, although no notices are included.)

#:Erik
--
Support organized crime: use Microsoft products!

David Bakhash

unread,
May 6, 1998, 3:00:00 AM5/6/98
to

hey.

this is exactly the feeling I get when I read others' C++ code. I am
actually frightened by it. sometimes I just can't believe that the
language made it. People are masochists. What *really* made me
laugh, the other day, was when a guy in the SPILAB group I work with
at BU ran `top' and saw that I was running a lisp.run process (CLISP)
and asked me if that was LISP. I told him "yeah, I do all this stuff
in Common Lisp". He, of course, uses only C, but he's never played
with Lisp. Anyway, he looked impressed, and said something like
"wow. that sounds really hard." Inside I wanted to laugh, and say
"are you nuts! the code you crank out is ten times more painful!" and
so I did, but I don't think he believed me. Funny. I should mention
that 9 times out of ten, when I pass by his office, I see Emacs in gud
mode (i.e. running gdb), which means that he's spending significantly
more time debugging than just coding. I guess we all do, in a way,
but I know that my proportion is better, and I'm just recently
converting from elisp to CL. I don't think that these guys understand
how crappy that language is. But the way it kinda forces you to write
OO is annoying. I can't seem to write a little function really fast,
like in CL.

dave

Scott L. Burson

unread,
May 7, 1998, 3:00:00 AM5/7/98
to

Erik Naggum wrote:
>
> the April, 1998 issue of the C/C++ Users Journal has an interesting
> piece. (don't ask me how I got it or why I read it.) P.J.Plauger writes
> an insanely elaborate article on how to print money values nicely in C++

Printing money *values*?? From the subject line I thought this would be
about printing *money*. How disappointing :-)

> this stuff is ideally suited to a
> data-driven design, a miniature "language" that can describe a locale's
> conventions succinctly, _without_ using virtual functions to return a
> dollar sign, a plus sign, a minus sign, a comma, a decimal point, etc,
> but _no_, this is C++. we don't have data, we have code. lots and lots
> of code.

Well said.

I wish I had had your criticisms handy when I wrote the C++ chapter of
_The_Unix_Hater's_Guide_.

-- Scott

* * * * *


To use the email address, remove all occurrences of the letter "q".

Nathan Myers

unread,
May 7, 1998, 3:00:00 AM5/7/98
to

Erik Naggum wrote:
>
> the April, 1998 issue of the C/C++ Users Journal has an interesting
> piece. [...] P.J.Plauger writes

> an insanely elaborate article on how to print money values nicely in C++
> using advanced new features in the language that very few implement,
> something called "facets" and having to do with the horribly kludge they
> call "locale". it's part of the Standard C++ Library. of course.
> ...

> OK, so what _is_ wrong with this picture? object-orientation, C++ style.
> _that's_ wrong. the article was worth reading to see how fundamentally
> screwed-up C++ _people_ are, too. [...] P.J.Plauger himself laments the
> tall costs. I can only concur.

Finding yourself in agreement with Plauger should set off
loud alarm bells. This column of his was a polemical piece
meant to take in people who have little familiarity with the
subject matter. He's very good at it; still, being taken in
is nothing to be proud of.

Reading Plauger's code is among the worst ways to learn anything about
the language, just as reading his code in "The Standard C Library"
was a poor way to learn about C. Bad code can be written in any
language (even LISP). It takes skill and intent to write good code
in any language (even LISP).

People have been writing "insanely elaborate" articles about the
"tall costs" of Common Lisp for a long time, and about other LISPs
before that. I would have hoped such exposure would inoculate
LISPers to this deceptive practice. Sadly, it seems to have taught
some to emulate it.

--
Nathan Myers
n...@nospam.cantrip.org http://www.cantrip.org/


Erik Naggum

unread,
May 7, 1998, 3:00:00 AM5/7/98
to

* Nathan Myers

| Finding yourself in agreement with Plauger should set off loud alarm
| bells. This column of his was a polemical piece meant to take in people
| who have little familiarity with the subject matter. He's very good at
| it; still, being taken in is nothing to be proud of.

how quaint. you haven't even seen the article, have you? I suggest you
actually go read it.

Nathan Myers

unread,
May 7, 1998, 3:00:00 AM5/7/98
to

Erik Naggum <c...@naggum.no> wrote:
>* Nathan Myers
>| Finding yourself in agreement with Plauger should set off loud alarm
>| bells. This column of his was a polemical piece meant to take in people
>| who have little familiarity with the subject matter. He's very good at
>| it; still, being taken in is nothing to be proud of.
>
> you haven't even seen the article, have you? I suggest you
> actually go read it.

Unlike some people, I am not in the habit of commenting on things
I know nothing about.

The article (really a column) was one of a series. The columnist
happens to have a strong financial interest in promoting a non-standard
subset of the library. The resulting bias is evident. Don't be *too*
embarrassed at having been taken in. You have plenty of company.

Nathan Myers

unread,
May 7, 1998, 3:00:00 AM5/7/98
to

Erik Naggum <c...@naggum.no> posted:
>Nathan Myers:

>| Don't be *too*
>| embarrassed at having been taken in. You have plenty of company.
>
> While you've been dead set on attacking me
> ... C++ is the choice of _bad_people_.
> You've just made the article virtually _prove_ my
> point that C++ is _only_ suited for unethical programmers.

Erik makes the case *so* succinctly, who can argue?

> What is it that ... meant I was taken in?
> Was it, like, _ironic_, or something? is this a _joke_ on C++ by
> P.J.Plauger, and I didn't get it, is that it?
> P. J. Plauger's code is _fantastically_ ugly. ...
> The inclusion of this crap in ...
> "the Standard C++ Library" is a royal disgrace ...

(I was just *sure* he'd start to get it, eventually.)
None of PJ's code is included in the Standard C++ Library.
His publications cannot be considered representative of the
thinking, design, or coding of serious C++ programmers.
If you thought otherwise, the joke is on you.

> BTW, please stop sending your infantile flames by mail, Nathan. you've
> made your point, such as it is. next time, try _communication skills_.

The "flames" were simply repeating back to Erik one line from each
of his messages to me, such as:

I regret to inform you that I have found no reason to believe that you
are anything but a pompous asshole.

and then

Thank you for your very valuable input in judging your character.

Such "communication skills"! The mind boggles.

Where did you folks *find* this guy? He's quite a hoot, though
I must say he already begins to grow tiresome. Is there a web
page of his howlers, as there is for other net kooks?

(Some personal advice for Erik:
Cut down on the caffeine. Take long, deep breaths. Go for walks.)

Erik Naggum

unread,
May 8, 1998, 3:00:00 AM5/8/98
to

* Nathan Myers

| The article (really a column) was one of a series. The columnist
| happens to have a strong financial interest in promoting a non-standard
| subset of the library. The resulting bias is evident. Don't be *too*
| embarrassed at having been taken in. You have plenty of company.

pardon me for trying to get through some of your gloating, but you seem
to have missed my point while you've been dead set on attacking me, and
so much so that you fail to appreciate that what you keep telling me is
_supporting_ my case: C++ is the choice of _bad_people_.

I don't know what it was that you read in my article, but I think you've
been had if you think it was a critique of the best of the brilliant
designs that C++ could bring to the world, of "how to succeed" or
somesuch. the article stood out because it's the kind of thing that C++
people do with their language. I couldn't care less _why_ they do it.

what is it that you believe I believed which would have meant I was taken
in? was it, like, _ironic_, or something? is this a _joke_ on C++ by
P.J.Plauger, and I didn't get it, is that it? given a financial interest
(or so you say), doesn't that just make him a fraud? do you think _I_
would spring for The Standard C++ Library because of this?

(hm, I guess I _was_ taken in once by P.J.Plauger if this is your line of
reasoning: I have a copy of "The Standard C Library", bought in good
faith before I had your valuable input on his and your character, but I
have never been so disappointed in any book on software. yes, I _did_
have that waste of ink and paper in mind when I read the article.)

P. J. Plauger's code is _fantastically_ ugly. (the lack of a consistent
bracing style irks me, too.) the inclusion of this crap in anything
called "the Standard C++ Library" is a royal disgrace, whether it be his
book or the standard is utterly irreleveant. at issue is that the
solution is _mind-numbingly_ stupid, typical of C++ design, regardless of
whether he made an effort to obfuscate, and regardless of whether it was
intended as parody on the parody of object-oriented programming.

now, what _more_ could _possibly_ be added to make the C++ world look
even _worse_? oh, yes, the columnist has a strong financial interest in
promoting a _non_-standard subset of the Standard C++ Library! thank
you, Nathan. that really helped. you've just made the article virtually


_prove_ my point that C++ is _only_ suited for unethical programmers.

BTW, please stop sending your infantile flames by mail, Nathan. you've


made your point, such as it is. next time, try _communication skills_.

#:Erik

Erik Naggum

unread,
May 8, 1998, 3:00:00 AM5/8/98
to

* Nathan Myers

| If you thought otherwise, the joke is on you.

finally a _conditional_ flame. that's actually quite some progress. I'm
delighted to deny the premise, so the consequent does not follow. might
the joke be on you, instead?

| > BTW, please stop sending your infantile flames by mail, Nathan. you've
| > made your point, such as it is. next time, try _communication skills_.
|

| The "flames" were simply repeating back to Erik one line from each
| of his messages to me, such as:

oh, I see, you have to take this all the way out, now. that's mature.

since you start posting private communication and strongly imply that I
sent you the first message, which I didn't, let's show the good people in
this newsgroup what you found in your heart to mail me and with what,
exactly, I responded. I _really_ resent liars, especially the kind of
scum who try to blame others for their own dysfunctional behavior, so
here's the complete exchange, for whoever cares.

I want to point out that Nathan Myers has _chosen_ his destructive
behavior towards me in the face of polite requests for something else
from his side, and _that_ is all the evidence I have needed to judge his
character. those who open a dialog by mail with me are constructive with
very few exceptions, and I make a strong point out of trying to reach an
individual, thinking, human being when _I_ mail people instead of posting
an article in a newsgroup, where a lot of other purposes are involved.
(I also try to keep mail and news entirely separate for this reason.)

this is cut straight out of the raw mail archive, but people here can
probably handle the slightly unusual format...

((mail-archive-version . 4)
(envelope
(from . "n...@cantrip.org")
(to . "clerik")
(time . "3103563920"))
(headers
(return-path . "<n...@cantrip.org>")
(received . "from cygnus.com (runyon.cygnus.com) by naggum.no with SMTP id <AA07445> for <cle...@naggum.no>; Thu, 7 May 1998 21:05:08 UT")
(received . "from mill (mill.cygnus.com [205.180.231.180]) by runyon.cygnus.com (8.8.7-cygnus/8.8.7) with ESMTP id OAA17838 for <cle...@naggum.no>; Thu, 7 May 1998 14:05:00 -0700 (PDT)")
(received . "by mill id m0yXXtF-00009FC (Debian Smail-3.2 1996-Jul-4 #2); Thu, 7 May 1998 14:07:41 -0700 (PDT)")
(message-id . "<m0yXXtF-00009FC@mill>")
(date . "Thu, 7 May 1998 14:07:41 -0700 (PDT)")
(from . "n...@cantrip.org (Nathan Myers)")
(to . "cle...@naggum.no")
(subject . "money & power"))
(body


""
"You wrote: "
"> OK, so what _is_ wrong with this picture? object-orientation, C++ style."
"> _that's_ wrong. the article was worth reading to see how fundamentally"
"> screwed-up C++ _people_ are, too."
""

"With all due respect, you really don't know what the hell you're "
"talking about."


""
"> P.J.Plauger himself laments the tall costs. I can only concur."
""

"Finding yourself in agreement with Plauger should set off very"


"loud alarm bells. This column of his was a polemical piece"

"intended to trick people who have little familiarity with the"
"subject matter. He's very good at it. Still, being taken in "


"is nothing to be proud of."
""

"Nathan Myers"
"n...@cantrip.org"
""))
((mail-archive-version . 4)
(envelope
(from . "er...@naggum.no")
(to . "erik")
(time . "3103567964"))
(headers
(return-path . "<er...@naggum.no>")
(received . "by naggum.no id <AA07480> for er...@naggum.no; Thu, 7 May 1998 22:12:41 UT")
(date . "07 May 1998 22:12:41 UT")
(from . "Erik Naggum <er...@naggum.no>")
(organization . "Naggum Software; +47 8800 8879; http://www.naggum.no")
(message-id . "<31035679...@naggum.no>")
(to . "Nathan Myers <n...@cantrip.org>")
(subject . "Re: money & power")
(in-reply-to . "<m0yXXtF-00009FC@mill>")
(references . "<m0yXXtF-00009FC@mill>"))
(body
"* Nathan Myers"
"| With all due respect, you really don't know what the hell you're talking"
"| about."


""
" I regret to inform you that I have found no reason to believe that you"

" are anything but a pompous asshole. please provide me some evidence that"
" you possess intelligence and have something useful to tell me, and we can"
" start (not resume) an exchange of ideas. thank you in advance for your"
" cooperation in making electronic mail a means of _communication_."
""
" should you, however, choose to send me more idiotic flames, I recommend"
" that you simply abstain. I'm not interested in hearing from people who"
" appear as stupid as you do in your message to me. please show enough"
" good taste to respect your _own_ time in not wasting it on more of same."
""
"#:Erik"))
((mail-archive-version . 4)
(envelope
(from . "n...@shell7.ba.best.com")
(to . "erik")
(time . "3103578312"))
(headers
(return-path . "<n...@shell7.ba.best.com>")
(received . "from shell7.ba.best.com by naggum.no with SMTP id <AA08109> for <er...@naggum.no>; Fri, 8 May 1998 01:05:06 UT")
(received . "(from ncm@localhost) by shell7.ba.best.com (8.8.8/8.8.BEST) id SAA01651 for er...@naggum.no; Thu, 7 May 1998 18:04:17 -0700 (PDT)")
(date . "Thu, 7 May 1998 18:04:17 -0700 (PDT)")
(from . "Nathan Myers <n...@best.com>")
(message-id . "<1998050801...@shell7.ba.best.com>")
(to . "er...@naggum.no")
(subject . "Re: money & power")
(in-reply-to . "<31035679...@naggum.no>"))
(body
" "
"> | With all due respect, you really don't know what the hell you're talking"
"> | about."


"> "
"> I regret to inform you that I have found no reason to believe that you"

"> are anything but a pompous asshole. please provide me some evidence that"
"> you possess intelligence ..."


""
"I regret to inform you that I have found no reason to believe that you"

"are anything but a pompous asshole. Period."
""
"Nathan Myers"
"n...@cantrip.org"
""))
((mail-archive-version . 4)
(envelope
(from . "er...@naggum.no")
(to . "erik")
(time . "3103580873"))
(headers
(return-path . "<er...@naggum.no>")
(received . "by naggum.no id <AA08154> for er...@naggum.no; Fri, 8 May 1998 01:47:51 UT")
(date . "08 May 1998 01:47:51 UT")
(from . "Erik Naggum <er...@naggum.no>")
(organization . "Naggum Software; +47 8800 8879; http://www.naggum.no")
(message-id . "<31035808...@naggum.no>")
(to . "Nathan Myers <n...@best.com>")
(in-reply-to . "<1998050801...@shell7.ba.best.com>")
(subject . "Re: money & power")
(references . "<1998050801...@shell7.ba.best.com>"))
(body
" thank you for your very valuable input in judging your character and for"
" proving that had nothing of value to share with me to begin with. it is"
" also useful to know that you are precisely the kind of person I would"
" expect to defend C++, the language of programmers without any ethics."
""
" further \"communication\" of the kind you are obviously limited to provide"
" is not desirable here. _please_abstain_ from following your urges."
""
"#:Erik"))

at this point, I taught my mail system to return mail from Nathan Myers
with a User Unknown error. despite my very clear requests to be relieved
of his immaturity, one message has been rejected and returned to him.
now, it may have been a mistake to reject his mail, since the immature
moron apparently doesn't take hints with anything resembling grace.

oh, and the obligatory personal advice to Nathan Myers: grow up. when
you initiate your contact with somebody by being a rude idiot, you get a
certain kind of response. if you had the intelligence to try something
else when your chosen venue or rudeness failed, such as beign polite and
communicative, you would have received another response. your reactions
betray your utter ignorance of this simple property of human psychology.

#:Erik, who never saw the virtue of suffering fools

Marco Antoniotti

unread,
May 8, 1998, 3:00:00 AM5/8/98
to

n...@nospam.cantrip.org (Nathan Myers) writes:

> Erik Naggum wrote:
> >
> > the April, 1998 issue of the C/C++ Users Journal has an interesting
> > piece. [...] P.J.Plauger writes
> > an insanely elaborate article on how to print money values nicely in C++
> > using advanced new features in the language that very few implement,
> > something called "facets" and having to do with the horribly kludge they
> > call "locale". it's part of the Standard C++ Library. of course.


"Facets"? Memory goes back to Minsky's "frames" and to the early
edition of AI Programming, by McDermott, Riesbeck and Charniack
(vintage early 80's).

Cheers

--
Marco Antoniotti ===========================================
PARADES, Via San Pantaleo 66, I-00186 Rome, ITALY
tel. +39 - (0)6 - 68 80 79 23, fax. +39 - (0)6 - 68 80 79 26
http://www.parades.rm.cnr.it

David Brabant

unread,
May 8, 1998, 3:00:00 AM5/8/98
to

> The April, 1998 issue of the C/C++ Users Journal has an interesting

> piece. (don't ask me how I got it or why I read it.)

Well, Erik. How did you get it ? And why did you read it ? :-)

--
David (hailing from Oslo, Norway)
"Le nationalisme est une maladie infantile. C'est la rougeole de
l'humanité." (Albert Einstein)
Pour ne pas niouzer idiot : http://attac.org/

Nathan Myers

unread,
May 8, 1998, 3:00:00 AM5/8/98
to

Erik Naggum <c...@naggum.no> wrote:
> I want to point out that Nathan Myers has _chosen_ his destructive
> behavior towards me in the face of polite requests ...

Here is what Erik considers polite, again, for amusement value:

"I regret to inform you that I have found no reason to believe
that you are anything but a pompous asshole."

and


"I'm not interested in hearing from people who appear as stupid

as you do..."

For readers' amusement, here are a few other polite remarks culled
from his recent postings:

You obviously speak without a shred of _relevant_ experience

Yardon me for being blunt, but you're getting to sound _real_ stupid.

You're stretching your putrid asshole a bit far here. Go hide under
your usual rock, again, OK?

Now you're moving beyond stupid and wander off like a lunatic

I have found most of [... ] to be utterly _disgusting_ people
to deal with

and a short essay on net decorum (typos corrected):

In my experience, the primary
measure for those who wish to maintain the coherent debates is to
focus only on the best parts of the discussion. Those who do not
wish to maintain any coherent debates are the first to complain
that others don't and that they, therefore, can't rein in the
crowds or just speak their minds without some authority figure like
a moderator. If you complain about the noise, you are the noise.

(from http://www.wildcard.demon.co.uk/c/advocacy.html)

I really am sorry that Erik (who seems, from a scan of non-C++-related
postings, to be quite clever) had such a bad experience at that one
company where he used some early dialect of C++ that it destroyed
his ability to reason on subjects touching on C++.

Followups to alt.flame.

Rainer Joswig

unread,
May 8, 1998, 3:00:00 AM5/8/98
to

In article <6iu1s6$le3$1...@shell7.ba.best.com>, n...@nospam.cantrip.org
(Nathan Myers) wrote:

> Where did you folks *find* this guy? He's quite a hoot, though
> I must say he already begins to grow tiresome. Is there a web
> page of his howlers, as there is for other net kooks?
>
> (Some personal advice for Erik:
> Cut down on the caffeine. Take long, deep breaths. Go for walks.)

I'd like to concentrate on the constructive content. Actually
comp.lang.lisp has improved in content quality a lot lately thanks to
people like Kent Pitman and many others.

We're talking only about a programming language here - so relax and
enjoy the fun *and* frustations of Lisp programming.


Greetings from a Hamburg with beautiful green trees, :-)

Rainer Joswig

--
http://www.lavielle.com/~joswig/


Kai Grossjohann

unread,
May 8, 1998, 3:00:00 AM5/8/98
to

>>>>> David Bakhash <ca...@bu.edu> writes:

> He, of course, uses only C, but he's never played with Lisp.
> Anyway, he looked impressed, and said something like "wow. that
> sounds really hard." Inside I wanted to laugh, and say "are you
> nuts! the code you crank out is ten times more painful!" and so I
> did, but I don't think he believed me. Funny. I should mention
> that 9 times out of ten, when I pass by his office, I see Emacs in
> gud mode (i.e. running gdb), which means that he's spending
> significantly more time debugging than just coding.

I wrote my Master's Thesis implementation stuff in C++. I would spend
half an hour writing some code, another hour debugging it so it
wouldn't crash in obvious ways, and then a day or two hunting for the
lost byte (the byte freed but never allocated or vice versa).
Horrors!

OTOH, I tested this with test cases of size four or five, and it still
worked for someone else who (foolishly) used it for size 1,000,000
problems. Duh.

kai
--
A large number of young women don't trust men with beards.
(BFBS Radio)

Francis Sergeraert

unread,
May 11, 1998, 3:00:00 AM5/11/98
to

Erik Naggum <cle...@naggum.no> writes:

> the April, 1998 issue of the C/C++ Users Journal has an interesting
> [... ...]


> an insanely elaborate article on how to print money values nicely in C++

There is an analogous story with functional programming. A few weeks
ago I questionned the C++-group about the way to program in C++:

(defun compose (f g)
#'(lambda (n)
(funcall f (funcall g n))))

if, in the C++-jargon, f and g are of type "int (* Z_f_Z) (int)", that
is, (function (integer) integer)

The answers led me to the SGI-STL and the file "stl_function.h"
(www.sgi.com/Technology/STL/stl_function.h). This gives you a goo idea
of the work that is necessary if ever you intend to do functional
programming in C++. But, as it is very well explained in the
introduction of Graham's book, the C++-thinking-mode does not contain
the very idea of functional programming.

Lianyun He

unread,
May 11, 1998, 3:00:00 AM5/11/98
to Francis Sergeraert

Flavors is a older version of CLOS. I am doing some research on Flavors.
Is there anyone in group giving me some infor and pointers to it? Thank
you very much.

*******************************************************************************
P.O.Box 47002
UCC Building; London
Ontario N6A 6G6 Canada i
**************************************************************************


Chuck Fry

unread,
May 12, 1998, 3:00:00 AM5/12/98
to

In article <Pine.SOL.3.96.980511...@brown.csd.uwo.ca>,

Lianyun He <l...@csd.uwo.ca> wrote:
>Flavors is a older version of CLOS. I am doing some research on Flavors.
>Is there anyone in group giving me some infor and pointers to it? Thank
>you very much.

I'm sure Barmar and Kent will chime in shortly, but here's my two cents'
worth.

The original Flavors was a message-passing OO system initially
implemented in Zetalisp (a.k.a. Lisp Machine Lisp) around 1978-80.
Flavors was one of the first Lisp-based OO systems to support multiple
inheritance. I seem to remember that Howard Cannon was one of the
originators, but I could be wrong about that.

While the Lisp Machine implementation had special microcode support to
make it fast, Flavors was also implemented on standard hardware. Franz
Inc.'s Allegro Common Lisp is one of these implementations, and in fact
the current release of Allegro CL still supports Flavors.

Flavors is documented in the Lisp Machine Manual (Chinual), if you can
find a copy, and in the current Allegro CL manual.

Eventually the folks at Symbolics drifted away from the message-passing
model, preferring a "generic function" model that they felt better fit
the traditions of the Lisp community. This was implemented as New
Flavors in the mid '80s, just before CLOS was adopted as a de facto
standard.
-- Chuck
--
Chuck Fry -- Jack of all trades, master of none
chu...@chucko.com (text only please), chuc...@home.com (MIME enabled),
chu...@gateway.idiom.com (SPAM ONLY)

Johannes Beck

unread,
May 12, 1998, 3:00:00 AM5/12/98
to

Hi

Scott L. Burson wrote


>Erik Naggum wrote:
>>
>> the April, 1998 issue of the C/C++ Users Journal has an interesting

>> piece. (don't ask me how I got it or why I read it.) P.J.Plauger
writes


>> an insanely elaborate article on how to print money values nicely in
C++
>

>Printing money *values*?? From the subject line I thought this would be
>about printing *money*. How disappointing :-)


I'm sure there's a hidden argument for format which can really print money
How about (format stream-to-a-good-colorprinter "~10000$"). There's not much
a format - command cant do. If this option is missing I'm voting that it
will be
implementented in the next ANSI-CL standard, and if only to attract more
people
to program in LISP.

Bye
Joe

0 new messages