RE: Language Feature Request: String Evaluation

1999-06-09 Thread Frank A. Christoph
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? 3. If instead I define an eshow function that strips "", how do I minimize the perforamnce hit of quote stripping? 4. If I want to share

Re: Language Feature Request: String Evaluation

1999-06-09 Thread Magnus Carlsson
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

Re: Language Feature Request: String Evaluation

1999-06-08 Thread Martin Norb{ck
--6TrnltStXW4iwmi0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Tue Jun 08 1999, S. Alexander Jacobson - : Fair enough, but then the function should not be called show. The spec : for show here is an internal serialization format. I guess the right :

Re: Language Feature Request: String Evaluation

1999-06-08 Thread S. Alexander Jacobson
On Tue, 8 Jun 1999, Paul Hudak wrote: I agree that Haskell's string notation could be improved, but note that you could write: sqlstring1 = "insert into mytable values \ \(NULL,'"#var1++"','"#(var1+var2)++"','"++var3++"')" That is arguably even more ugly than just consistently using

Re: Language Feature Request: String Evaluation

1999-06-08 Thread S. Alexander Jacobson
eshow needs to apply to show to non string types. -Alex- ___ S. Alexander Jacobson Shop.Com 1-212-697-0184 voiceThe Easiest Way To Shop On Tue, 8 Jun 1999, Martin Norb{ck wrote: Tue Jun 08

Re: Language Feature Request: String Evaluation

1999-06-08 Thread Jon . Fairbairn
On 8 Jun, Paul Hudak wrote: show x should be a string that when printed looks like the value that you would have to type to generate it directly. This example is most instructive: [...] and this is just cute: main = putStr (quine q) quine s = s ++ show s q = "main = putStr (quine

Re: Language Feature Request: String Evaluation

1999-06-08 Thread Paul Hudak
var1 = 2*2 var2 = 4*var1 var3 = "Foobar"" sqlstring = "insert into mytable values "++ "(NULL,'"++(show var1)++"','"++(show var2)++"','"++var3"');" It would be much nicer if Haskell did what perl,php, and tcl do: sqlstring="insert into mytable values

Re: Language Feature Request: String Evaluation

1999-06-08 Thread Magnus Carlsson
I've been using a preprocessor to Haskell that I call HacWrite, which adds a new kind of string appropriate for entering text. Such strings can span multiple lines and can be escaped using curly brackets: var1 = 2*2 var2 = 4*var1 var3 = «Foobar» sqlstring = «insert into mytable values

Re: Language Feature Request: String Evaluation

1999-06-08 Thread Keith Wansbrough
Alex, you might want to explain to people (such as myself) who don't know how Perl etc decide how much white space to insert in the string that's broken across a line. One space? None? What of the indentation spaces on the new line? What if you really want those spaces to appear in

Re: Language Feature Request: String Evaluation

1999-06-08 Thread S. Alexander Jacobson
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? 3. If instead I define an eshow function that strips "", how do I minimize the perforamnce hit of quote stripping? 4. If I want to share my

Re: Language Feature Request: String Evaluation

1999-06-08 Thread Lennart Augustsson
"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