Re: [Haskell-cafe] Motion to unify all the string data types

2012-11-12 Thread Francesco Mazzoli
At Mon, 12 Nov 2012 11:21:42 +0800, John Lato wrote: Speaking as the ListLike maintainer, I'd like this too. But it's difficult to do so without sacrificing performance. In some cases, sacrificing *a lot* of performance. So they have to be class members. However, there's no reason

Re: [Haskell-cafe] Motion to unify all the string data types

2012-11-12 Thread Francesco Mazzoli
At Mon, 12 Nov 2012 10:26:01 +, Francesco Mazzoli wrote: Interesting. Are we sure that we can't convince GHC to inline the functions with enough pragmas? Inline and SPECIALIZE :). Francesco. ___ Haskell-Cafe mailing list

Re: [Haskell-cafe] Motion to unify all the string data types

2012-11-11 Thread John Lato
From: Francesco Mazzoli f...@mazzo.li At Sat, 10 Nov 2012 15:16:30 +0100, Alberto G. Corona wrote: There is a ListLike package, which does this nice abstraction. but I don't know if it is ready for and/or enough complete for serious usage. I?m thinking into using it for the same

Re: [Haskell-cafe] Motion to unify all the string data types

2012-11-11 Thread Bas van Dijk
On 10 November 2012 17:57, Johan Tibell johan.tib...@gmail.com wrote: It better communicates intent. A e.g. lazy byte string can be used for two separate things: * to model a stream of bytes, or * to avoid costs due to concatenating strings. By using a strict byte string you make it clear

Re: [Haskell-cafe] Motion to unify all the string data types

2012-11-10 Thread Gábor Lehel
On Sat, Nov 10, 2012 at 4:00 AM, Johan Tibell johan.tib...@gmail.com wrote: As for type classes, I don't think we use them enough. Perhaps because Haskell wasn't developed as an engineering language, some good software engineering principles (code against an interface, not a concrete

Re: [Haskell-cafe] Motion to unify all the string data types

2012-11-10 Thread Alberto G. Corona
Andrew: There is a ListLike package, which does this nice abstraction. but I don't know if it is ready for and/or enough complete for serious usage. I´m thinking into using it for the same reasons. Anyone has some experiences to share about it? 2012/11/10 Andrew Pennebaker

Re: [Haskell-cafe] Motion to unify all the string data types

2012-11-10 Thread Francesco Mazzoli
At Sat, 10 Nov 2012 15:16:30 +0100, Alberto G. Corona wrote: There is a ListLike package, which does this nice abstraction. but I don't know if it is ready for and/or enough complete for serious usage. I´m thinking into using it for the same reasons. Anyone has some experiences to share

Re: [Haskell-cafe] Motion to unify all the string data types

2012-11-10 Thread Tobias Brandt
On 10 November 2012 04:00, Johan Tibell johan.tib...@gmail.com wrote: As for type classes, I don't think we use them enough. Perhaps because Haskell wasn't developed as an engineering language, some good software engineering principles (code against an interface, not a concrete

Re: [Haskell-cafe] Motion to unify all the string data types

2012-11-10 Thread Johan Tibell
On Fri, Nov 9, 2012 at 10:22 PM, Roman Cheplyaka r...@ro-che.info wrote: * Johan Tibell johan.tib...@gmail.com [2012-11-09 19:00:04-0800] As a community we should primary use strict ByteStrings and Texts. There are uses for the lazy variants (i.e. they are sometimes more efficient), but in

[Haskell-cafe] Motion to unify all the string data types

2012-11-09 Thread Andrew Pennebaker
Frequently when I'm coding in Haskell, the crux of my problem is converting between all the stupid string formats. You've got String, ByteString, Lazy ByteString, Text, [Word], and on and on... I have to constantly lookup how to convert between them, and the overloaded strings GHC directive

Re: [Haskell-cafe] Motion to unify all the string data types

2012-11-09 Thread Johan Tibell
Hi Andrew, On Fri, Nov 9, 2012 at 6:15 PM, Andrew Pennebaker andrew.penneba...@gmail.com wrote: Frequently when I'm coding in Haskell, the crux of my problem is converting between all the stupid string formats. You've got String, ByteString, Lazy ByteString, Text, [Word], and on and on...

Re: [Haskell-cafe] Motion to unify all the string data types

2012-11-09 Thread Roman Cheplyaka
* Johan Tibell johan.tib...@gmail.com [2012-11-09 19:00:04-0800] As a community we should primary use strict ByteStrings and Texts. There are uses for the lazy variants (i.e. they are sometimes more efficient), but in general the strict versions should be preferred. I'm fairly surprised by