Subject: Re: ACL 6.0 Trial Edition ships with non ANSI reader behavior.
From: Erik Naggum <erik@naggum.net>
Date: 2000/11/05
Newsgroups: comp.lang.lisp
Message-ID: <3182446271277745@naggum.net>

* John Foderaro <jkf@unspamx.franz.com>
| All developers at Franz work in a case sensitive lower case Lisp
| (i.e. now called a Modern mode lisp) yet all our code works in  an
| ANSI (upper case) lisp (except that just recently code to  interface
| with case sensitive things (e.g. XML and Java) doesn't work well in
| ANSI mode, but that's off topic for this discussion).

  There is nothing in the case sensitivity of these languages that
  requires a that a case-insensitive reader be killed.  We have been
  able to work with case-sensitive readers for a very long time -- it
  really is no big deal.  When you lower-case all the symbol names,
  you make that much, much easier for all of us and I thank you for
  this, I really do, but I hate you for breaking the standard in the
  process when that is so _obviously_ unnecessary and a hidden agenda
  against the standard and the committee sticks out like a sore thumb.

| Why don't we set readtable-case to :preserve in a Modern lisp?  It's
| because that would harm the ability to import ANSI code and make it
| work in Modern mode as well.  It would make it harder to write code
| that works in ANSI and Modern modes.

  *boggle*  You have _broken_ readtable-case so it is hard-wired to
  :preserve no matter what it reports or I set it to.  If what you are
  saying is true, then _you_ have harmed the ability to import ANSI
  code and make it work in Modern mode as well by doing that.  Except
  you aren't telling anyone about it, which you would if you did make
  that change.

  What you're saying is pretty obviously false, but by now I realize
  that I'll never get through to you, which means I shall have to
  fight _against_ your Modern mode.  Pretty stupid move, John.  I want
  lower-case symbol names.  I want a case-sensitive reader by default.
  I _don't_ want to have to get rid of the case-insensitive reader in
  the process because I actually _need_ that functionality, but since
  you force me to accept that package deal, I simply _cannot_ work
  with the stuff I want, and I'll have to go back to the only mode in
  which readtable-case actually works as standardized.  What _are_ you
  so bone-headed about this?  What _would_ it cost you to keep within
  the standard on the rest of these issues?

  If you had set readtable-case to :preserve, which is its real value,
  anyway, the standard says to ignore all the other case settings,
  which is also precisely what you do, so the Modern behavior is all
  _within_ the standard.

  If people set the readtable-case directly, they know what they are
  doing.  If they want to read Lisp data in standard syntax, which is
  but one _effect_ of choosing :upcase, they are supposed to use the
  macro with-standard-io-syntax, not roll their own just because they
  can.  That would be a violation of intent, and Kent Pitman has made
  a very good point about accidental truths and necessary truths.  It
  is a _necessary_ truth that if you use with-standard-io-syntax, you
  will be able to read Lisp code in the standard syntax.  It is an
  _accidental_ truth that you may be able to do so if you set the
  readtable case to :upcase.  This is f*cking obvious.  Why do you
  fight this and refuse to get it?  What do you gain by antagonizing
  the standard and me and everybody else who would like to seee a Lisp
  with lower-case symbol names, a case sensitive reader, but still
  have the _choice_ we have come to love about Common Lisp?  What _is_
  it with you that makes you work so hard to remove that choice?  It
  really and truly does move the choice in a particular readtable with
  case-insensitive upper-casing behavior to a choice in Modern or ANSI
  Lisp, and that is not the choice I want to make just because I want
  a simple, straightforward, well-defined functionality in ANSI CL
  _with_ your new decisions, and there _is_ no technical reason you
  don't want to give it to me.  It's _political_, and although we have
  one of those "choose the idiot with the nicest teeth in his grin"
  contests right now, that doesn't mean I'm willing to buy any package
  deals based on similarly irrelevant criteria.

| The reason that it would cause problems is that it brings
| readtable-case into play in Modern mode.

  So you have created another, global, variable instead with exactly
  the same semantics as the readtable setting, forcing people to fuck
  with that instead of the standard interface to the reader for no
  other reason that you historically hate the decisions that led to
  their inclusions.  Good stuff for religions.  Bad engineering.

| ANSI code may create a readtable, and then set its case to :upcase
| so it can read in some data that it had written before.

  It may _also_ create a readtable and set its case to :upcase because
  it really wants the symbol names in upper-case.  You disallow that.
  I'm not objecting to what you have achieved.  I object to the fact
  that you force me to duplicate functionality with non-portable code
  for no good reason only to achieve what I used to achieve: upcasing
  symbol names in the reader.  Because of your obnoxious and personal
  dislike of the case stuff in ANSI Common Lisp, I have to redo what
  is supposed to be in there for those uses where case-insensitivity
  is well-defined and actually useful.  I'm beginning to hate your
  decisions on case for _that_ reason, not because you try to preserve
  some other property of the environment that I disagree with.

  If you have to break something to get something so fundamental and
  relatively simple changed, you're guilty of bad engineering, as in:
  Changing the world before you change your tools.

  What kinds of written data would your claim actually work out on?
  Because you have ripped out the case-translation in the reader, it
  would have to be all lower-case in the _input_ to get the right
  symbols, but that is _not_ the canonical case, so you end up with
  all upper-case symbols, anyway, since that _is_ standard, as in:
  produced within the body of a with-standard-io-syntax form.

  What you could do is take this back to the drawing board, declare
  yourself unfit to make technical decision because of too much
  personal involvement, and let other people find ways to reach all of
  your (technical) goals while breaking none of other people's goals
  and needs.  That is what mature standardization is all about, and
  that's how mature people interact when they have conflicting needs.
  You may think you won't find enough lower-case-friendly people to
  get the committee around if you had to, but that is _irrelevant_.
  You're already going ahead to implement something outside of the
  standard, so you should _minimize_ (as in: _good_ engineering) the
  effects upon the rest of the system with your change.

  E.g., with-standard-io-syntax should print in lower-case, escape
  upper-case letter in symbols (no harm done in case-sensitive mode)
  and lower-case symbols on input.  Just reverse the case in a fully
  consistent, predictable way and you'll be surprised how little of
  the language and environment actually _does_ change.
  
| This isn't going to work in Modern lisp since standard symbols are 
| in lower case.

  So the readtable-case has to be :lower, instead, because symbols are
  now all lower-case.  Big deal.

| So when porting you're going to have to search for all uses of
| readtable-case and insert conditional code to make it work in ANSI
| and Modern mode.

  *boggle*  What?  Excuse me?  You cannot possibly be serious, John!

  We have with-standard-io-syntax to get standard syntax.  If people
  meddle with the readtable-case, they do that on purpose and must
  accept full responsiblity for it.  No need to look for anything.
  Their settings correspond to their input requirements.  If they set
  :upcase, they will look for symbols with upper-case names and they
  will have interned them with upper-case names, and if they are not
  the complete morons you expect them to be, they will write code that
  names them in all uppercase, too, simply because that is so much
  less confusing to the reader of the code.  (We agree fully that it's
  a royal mess to deal with case translations in your head while
  reading the code.  Case sensitive makes maximal sense across the
  board, but that's _code_, not input from the outside world.  You are
  _reversing_ the code-is-data paradigm of Lisp with this move, John!
  You force me to treat external data as if it code, but it's really
  the other way around: It is code that I may want to treat as data.)

| The conditional code has to be runtime and not compile time
| conditional since the decision as to which mode to run in is made at
| runtime and a given fasl file can be compiled in one mode and run in
| another.

  I wonder who you think you're fooling with this joke of an argument.
  I wonder if you realize how much you insult people's intelligence by
  pretending that this is valid reasoning that they are supposed to
  accept.

  You have made a number of decisions that impact the effect of your
  desire to change the symbol-names to lower-case and the reader to
  case-sensitive.  Those decisions are obviously not disconnected and
  the effect upon the whole system that you detail so painstakingly
  tell me one thing: They were made with blatant disregard for the
  standard and the possibility of operating _within_ the it to the
  extent this is possible with such a change.  _Obviously_ you then
  end up with a design that has disregard for the standard built-in
  and fundamental to it.  You could have made different decisions and
  that is what I urge you to make.  Go back and fix whatever it is
  that you did that caused this important aspect of Common Lisp to
  break for no good reason just because you want to switch the case of
  the symbols.  You're normally an excellent engineer, John, but this
  stuff is as silly as it gets.  I have seen your work and I'm truly
  impressed with what you can do when you set your mind to it, but I'm
  equally unimpressed with what you do when you set your mind not do
  something.  I can be a stubborn son-of-a-bitch myself, but at least
  I can be shown to be mistaken or have my assumptions challenged and
  then I'm a son-of-a-bitch with the new position, instead.  I pride
  myself with that combination of qualities.  (We shall hear from Xah
  Lee, shortly, of course.)

| So what we did with set-case-mode is akin to setting up a virtual
| machine.  If you run in Modern mode your program still sees
| *print-case* set to :upcase and readtable-case set to :upcase and
| happily goes on it way, thinking that it's running in a normal ANSI
| lisp (unless it checks the value of *current-case-mode*).

  Except that every time it looks at symbol-names as strings, it gets
  the wrong results because you lied to it.  Since people often make
  the mistake of hard-wiring case into their code and do not follow
  the fairly simple rules that Franz Inc has set for their code not to
  _know_ the case, there is simply no way you can win with such people
  and consequently it is irrational to try.  The problem is that those
  who do _not_ hardwire the case into their code might still want to
  know what to expect from the reader by _querying_ it for what it
  does, in that portable way that you hate and fight.  And then you
  lie to it, pretending to be something you aren't: in ANSI mode.

  Really portable ANSI Common Lisp _will_ query and set the readtable-
  case because it is a known factor of the language.  That is what you
  break, simply because you don't _want_ that factor to be there.
  This is not only irrational, it is hostile to rational programmers.
  This is just like that dumb-ass politician who tried to come off as
  a Latino by changing his name in the campaign to get Hispanic votes.
  Just how dumb does he think those people are?  Just how dumb _do_
  you think people who actually respect the standard on its case
  issues are, John?  Is that why you show no respect for them?

  I'm telling you just how _unhappily_ my code goes on its way when
  you broke readtable-case for me so case translation no longer works.
  If you tell me to go fuck myself because I'm unhappy about this, I
  have no choice but to be your worst enemy in this case business when
  we have very similar goals, except I don't have an urgent personal
  need to piss off the Common Lisp committee because I don't think
  they did such a terribly evil thing as you think they did.

| I can only state that 20 years of experience has show that this kind
| of thing works.  I've yet to find a single ANSI program that I can't
| import and make work in both ANSI and Modern modes.

  Don't piss me off with bullshit like this!  Damn it!  If this is the
  level of respect you have for me, you can go to hell, John.  If you
  think I'm making up this story about needing readtable-case :upcase
  (or :lower, for that matter) because I'm processing Lisp data and
  _want_ it to be case-insensitive and you're telling me that you have
  never met an ANSI Common Lisp program that didn't want case not to
  matter for its Common Lisp or Lisp-like input, _your_ credibility
  has hit an all-time low, way below several presidentail candidates.

| So  while what we have may not be pretty, it does the job that it
| was designed to do.

  Really?  So what I'm telling you that I need was explicity excluded
  by design so I can't get those two nifty things you did that I want,
  namely lower-case symbol names and the _choice_ of a case-sensitive
  reader?  I had the choice, I wanted the lower-case symbol names.
  You gave me the lower-case symbol names but took away the choice.

  As we had a choice with upper-case symbol names, how come we can't
  have a choice with lower-case symbol names?  You admit to the fact
  that you can write code in all lower-case and have it compile in
  both modes -- in fact you boast about this.  What would change if
  you only changed Common Lisp from upper-case to lower-case symbol
  names and adjusted the relevant settings accordingly?  _NOTHING!_
  (Or probably "_nothing!_".)  You would be able to do exactly what
  you have been doing in a Lisp with upper-case symbols.  The reason
  you make a big stink about this is that your way of dealing with a
  lower-case Lisp was _designed_ to piss off the people you still bear
  a grudge against for what you see as a major screw-up in the
  language standardization process.  Get the hell _over_ it, John.

  There is _no_ technical reason why we can't just flip the case and
  make the necessary changes as they propagate through the standard to
  get this right.  Moreover, a position _in-between_ the two extremes
  would work for far more people than your bone-headed, political
  position: case-insensitive-lower, or just what a readtable-case
  value of :lower instead of :upper would do in a Common Lisp with
  lower-case symbol names.

| If the decision hadn't been made to make Common Lisp case
| insensitive upper (and I tried my best to stop it), then there
| wouldn't be *print-case* or readtable-case in the language.  They
| are just kludges to fix a botch in the language.

  Yes, this is definitely your real agenda.  You _are_ breaking the
  language on purpose because you think it has a kludge to fix a
  botch.  That's stupid of you, John, just plain stupid, and it's on
  purpose, too.  You have made up your mind to be stupid and annoying
  and obnoxious about this issue instead of getting what you want:
  Lower-case symbols and a consensus about it.  I fear that the reason
  is that you think the people you imagine yourself up against are
  criminally insane and so you cannot use what they opened up for.

| If you really think that you want case transformations in the reader
| in Modern mode then we have to do them in a different way (i.e. a
| different function name would have to be involved (e.g
| readtable-case-modern) so that it didn't ruin the virtual machine
| effect we've got going.

  This may come as a surprise to you, but you don't _have_ a virtual
  machine effect.  It works only as long as the input obeys the very
  strict protocol that Franz Inc code obeys.  What we actually need is
  something that works _well_ for people who don't work at Franz Inc,
  too, and they are more than very likely to think the standard ranks
  higher than your/company coding standards.  Sorry about that.

| And to implementors of other lisps: I  encourage you to add support
| for a Modern mode in your lisps as well.  If I can help you achieve
| this send me email.

  Oh, God, please don't.  Don't ask John.  Get it right, instead.

  Just flip the case, change all the corresponding references to
  :upcase in the standard to :downcase, and let the abstraction
  represented by with-standard-io-syntaxa work its magic with
  lower-case symbols and a case-insensitive reader first, then add
  case-sensitivity or let people make that choice as _they_ see fit
  and have had time to work out the effects of the case change, if any
  -- I doubt there will be many.

  Let me wax political, too: I urge all Franz Inc customers to write
  to them (on real paper) and request that they continue their work on
  a Common Lisp with lower-case symbols and work to continue to make
  Common Lisp case-sensitive about it over time, but in exactly the
  same way Common Lisp has upper-case symbols today.  Appeal to their
  sense of evolution and bringing together a community, instead of the
  splinter group revolutionary attitude that only threatens to bring
  people into awareness of which "faction" they must belong to and
  which to fight against.

#:Erik
-- 
  Does anyone remember where I parked Air Force One?
                                   -- George W. Bush