READ-DEFAULT-FLOAT-FORMAT and reader macros

From: Nicolas Neuss (my.name_at_iwr.uni-heidelberg.de)
Date: 12/30/04


Date: Thu, 30 Dec 2004 16:12:26 +0100

Hello,

for numerical purposes, SINGLE-FLOAT precision will usually be too bad.
Because I got tired with typing numbers as 1.0d0 many times I have switched
*READ-DEFAULT-FLOAT-FORMAT* to DOUBLE-FLOAT when starting up Lisp. This
more or less works for me, but I wonder if it is the right thing to do,
because I have experienced trouble at least one time when loading another
application which was expecting SINGLE-FLOAT to be the default reader
format.

Maybe the best thing would be that no application should depend on
*READ-DEFAULT-FLOAT-FORMAT*, but works reasonably with any type of numbers.
Then the user would choose the default format when loading the application.
On the other hand, this could introduce undesired effects when the format
is changed between loading the application and actually using it (for
example, I generate classes and methods special to certain float formats).

Another question related to this is what to do with reader macros which are
defined for an application. E.g. in my application Femlisp, I have defined
#M(...) for reading matrices, but have seen later that it is also used in
the SERIES package for other purposes. Should applications generally use a
separate readtable when defining reader macros? Then, of course it would
be nice if IDEs (e.g. SLIME) would switch readtables as needed.

I remember a recent discussion about related issues (case sensitivity?)
which more or less concluded that the situation could not be handled
perfectly within ANSI CL (in contrast to Genera). But what are people
really doing in such cases?

Thank you and happy new year,

Nicolas.



Relevant Pages

  • Re: GNU Public Licences Revisited (again)
    ... >That's a propriatory development environment for a propriatary language. ... >The Office file format is publicly available from Microsoft. ... >> expensive to switch away to something else. ...
    (comp.programming)
  • Re: Customizing A Number Format
    ... does not normally require a switch. ... Word MVP web site http://word.mvps.org ... you are saying you can't have 1 field with numbers and alpha> characters? ... >>> Does this mean that you cannot format a field that contains both>>> text and numbers? ...
    (microsoft.public.word.mailmerge.fields)
  • Re: switching formats
    ... |>would be interested in is just how much such a switch affects ATSC tuners ... | Some PBS stations switch between PBS-HD plus their local SD feed at ... | local ID on the HD channel every hour, ... not have to be concerned right then what the format of it is. ...
    (alt.tv.tech.hdtv)
  • Re: GNU Public Licences Revisited (again)
    ... The Office file format is publicly available from Microsoft. ... > What all these have in common is that they're closed source, ... > expensive to switch away to something else. ... > well pay for key bug fixes, essential features, etc. ...
    (comp.programming)
  • Re: help with paragraph identification
    ... switch to remove the hidden ... > format from the STYLEREF field isn't working. ... Word has a construct known as a FRAME. ... Frames can be part of a paragraph STYLE. ...
    (microsoft.public.office.developer.vba)