S. Alexander Jacobson writes:
 > In principle I can do this, but:
 > 1. how do I hide the import of show String to replace it w/ my own?
 > 2. If I do replce show String what else will break?

I'd rather let the preprocessor insert calls to eshow, and leave show
as it is.

 > 3. If instead I define an eshow function that strips "", how do I minimize
 > the perforamnce hit of quote stripping?

Maybe you could make eshow a member in a class EShow, which defaults
to show, and make a special instance for Char (add a member eshowList).

 > 4. If I want to share my code, I have to share both the actual codebase as
 > well as the preprocessor code.  This seems like sucha  basic language
 > syntax issue that I shouldn't have to worry about which version of haskell
 > your collaborators are running.  Everyone writing their own preprocessor
 > will severely balkanize the language.

I think it's a good idea to use a preprocessor for experimenting with
your own language extensions. When (and if) the extensions settle and
turn out to be useful, you could consider proposing them as part of a
language definition.

 > 5. How does the use of this pre-processor interact w/ tools like Derive
 > and PolyP which are also implemented as preprocessors?

I don't know. Buth the HacWrite preprocessor is simpleminded, it only
looks for the new text lexemes, and doesn't know about the Haskell
syntax. If you run such a preprocessor first, I think it would work.

 > That being said, I would be happy to take a shot at HacWrite if it had a
 > shot of becoming part of the language definition (or if it was a standard
 > part of the various haskell distributions: ghc, hugs, hbc,etc.) and if
 > Magnus would allow it.
 > 
 > Is there a good lanugage reason to object to this feature?  It seems like
 > a no brainer imprpovement.

I don't see any need to put something like this into the language
definition for the moment. But if you want to use HacWrite, I could
try to put it on some web page.

/M

 > 
 > -Alex-
 > 
 > 
 > ___________________________________________________________________
 > S. Alexander Jacobson                        Shop.Com
 > 1-212-697-0184 voice                 The Easiest Way To Shop
 > 
 > On Tue, 8 Jun 1999, Lennart Augustsson wrote:
 > 
 > > "S. Alexander Jacobson" wrote:
 > > 
 > > > HacWrite certainly seems like an improvement over Haskell.
 > > > However, it is just not as good as the scripting languages.
 > > > HacWrite still requires the author to differentiate between strings and
 > > > other types, still requires explicit use of show and still requires more
 > > > typing and curly balancing.  Isn't this nicer?
 > > >
 > > > "insert into mytable values (NULL,'$var1','$(var2+var3)','$var3')
 > > >
 > > 
 > > So add your own little modification to HacWrite.  It would be easy enough
 > > to add $ interpolation.
 > > 
 > >     -- Lennart
 > > 
 > > 


Reply via email to