Hi,

I would like to sugest a new basic type in Haskell. What if we had
something like this (with any other quoting character):

«Je ne parle pas français. Meu nome é Maurício. ¿Hablas español?»

This would  be of type  Utf8. I  think now it  is not a  bad idea,
since Haskell source  code is supposed to be  utf-8.  The internal
representation of  this datatype would be a  null terminated utf-8
byte vector. No standard operations would be defined on that type,
i.e., it would be  a “communication standard” between everybody,
but module  writers could develop  different basic usage  based on
operations on them  using Foreign.  (I think it  would be dificult
to set default operations, since  there are so many things you can
do with utf-8.)

Pros:

 * There  would  be  no  doubt   you  can  use  utf-8  when  using
   this, since there's no conversion involved.

 * Cleaner code  on utf8 operations,  maybe.  There are  many utf8
   modules today with different goals in mind, I thing it would be
   nice if  they could share this  common basic type  and a common
   underline implementation.

Cons:

 * Probably, many. I have no deep understanding of Haskell.

Thanks for your attention,
Maurício

_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to