Re: HTMLGEN: arguments can't be adjustable strings?

Steve Haflich <[email protected]> Tue, 23 Dec 2003 07:46:34 -0800
Newsgroups gmane.lisp.open-source.franz
Message-ID <[email protected]>
   To: Andrew Philpot <[email protected]>, opensource
   
   It could have been coded that way for efficiency considerations
   rather than as an oversight.

I would vote that it is an implementation bug.  If arguments were
restricted to simple-string, then htmlgen could not be used directly
with other standard operators that _might_ return a non-simple string.
Consider cl:format nil, for example, which is documented only to
return string.  (I believe format always creates a simple-string on
Allegro, but this code is supposed to be portable.)

Personally, I don't like htmlgen because it does not integrate
smoothly with the rest of the language.  If string arguments were
restricted to simple strings in some optimization for speed, that
would only make it worse.
   
I say that such an optimization would be misguided because it is
possible with careful coding to eliminate most non-simple array
inefficiency, although that might require platform-dependent
conditionalized code.  By "eliminate the inefficiency" I mean that
allowing non-simple strings need not seriously impact code speed in
the usual case when a simple string is passed.  This is tedious, but
IMO worthwhile and even necessary when writing critical system tools.
There is a convenience macro for doing this in Allegro, but it isn't
exported or documented.

   That being said if the documentation says 'strings' are allowed
   then it would be a bug (in the documentation if nothing else).