Re: Proposal: Substring library for Haskell

1999-05-26 Thread Koen Claessen
George Russell wrote: | I think the whole idea of making strings lists of characters is | barmy, and one of the few things which are a big disadvantage of | Haskell over ML. The consequence is that one must take a huge | performance hit on any portable code that deals with text a lot (as | m

Re: Proposal: Substring library for Haskell

1999-05-25 Thread George Russell
I think the whole idea of making strings lists of characters is barmy, and one of the few things which are a big disadvantage of Haskell over ML. The consequence is that one must take a huge performance hit on any portable code that deals with text a lot (as most code does), for the very dubious b

RE: Proposal: Substring library for Haskell

1999-05-20 Thread Jon . Fairbairn
On 20 May, Frank A. Christoph wrote: > > > > I would welcome either. However, there is a huge body of code that > > > assumes strings are lists of chars. > > > > Yes, obviously... this is for new programs (which people aren't writing > > because of Haskell's inefficiency in dealing with strings

RE: Proposal: Substring library for Haskell

1999-05-20 Thread Frank A. Christoph
> > I would welcome either. However, there is a huge body of code that > > assumes strings are lists of chars. > > Yes, obviously... this is for new programs (which people aren't writing > because of Haskell's inefficiency in dealing with strings). While I think Haskell should also support primi

Re: Proposal: Substring library for Haskell

1999-05-18 Thread Keith Wansbrough
Giuliano P Procida <[EMAIL PROTECTED]> asks: > [Substring stuff snipped] > Were you thinking of something like: > > class Stringy foo where > toString :: foo -> String > someop :: foo -> foo -> foo > ... > > and just use Stringy foo => foo instead of String everywhere? > > Or just having

Re: Proposal: Substring library for Haskell

1999-05-18 Thread Giuliano P Procida
On Tue, May 18, 1999 at 02:22:55PM +0100, Keith Wansbrough wrote: > Does anyone else think this is a brilliant idea that should be > implemented? I float the idea in case (1) someone else is already > doing this, or (2) someone else is interested in doing it. It > shouldn't be too hard, but I do

Proposal: Substring library for Haskell

1999-05-18 Thread Keith Wansbrough
In a thread "The Imperative strikes back?" on comp.lang.functional a couple of weeks ago, Brian Rogoff <[EMAIL PROTECTED]> mentioned: > [..] I really wish that > the basic string handling capabilities in some FP languages were a bit > better thought out. For example, I think in Haskell strings a

RE: Proposal: Substring library for Haskell

1999-05-18 Thread Sigbjorn Finne (Intl Vendor)
GHC's PackedString library goes some way towards providing all this. However, a PackedString currently just records the length of the sequence of bytes it points to, but could without much incident record the byte offset to start at as well. hth --sigbjorn Keith Wansbrough <[EMAIL PROTECTED]> w