Re: [Haskell-cafe] Re: Float instance of 'read'

2008-09-18 Thread Paulo Tanimoto
Hi, Mauricio, sorry for hijacking your thread. : ) I have one question about handling or parsing decimal places. I noticed that Haskell doesn't accept values starting with just the point, e.g., .50 or .01. I suppose that's abuse of notation in the first place (and I'm guilty of it), but I ofte

[Haskell-cafe] Re: Float instance of 'read'

2008-09-18 Thread Mauricio
Agree about the answer, not about the question. The correct one would be "is it possible to change haskell syntax to support the international notation (...) For some sense of "possible", the answer is clearly yes. However, it is perhaps misleading to call commas "THE international notation". (

Re: [Haskell-cafe] Re: Float instance of 'read'

2008-09-17 Thread Richard A. O'Keefe
On 18 Sep 2008, at 3:20 am, Mauricio wrote: Agree about the answer, not about the question. The correct one would be "is it possible to change haskell syntax to support the international notation (not any locally sensitive one) for decimal real numbers? Would a change in 'read' be a good first s

[Haskell-cafe] Re: Float instance of 'read'

2008-09-17 Thread Mauricio
>>> Do you think 'read' (actually, 'readsPrec'?) >>> could be made to also read the international >>> convention (ie., read "1,5" would also work >>> besides read "1.5")? (...) > IMAO, it's bloody well stupid to use commas for > either the decimal separator or the thousands > separator, as it ha

Re: [Haskell-cafe] Re: Float instance of 'read'

2008-09-17 Thread Brandon S. Allbery KF8NH
On 2008 Sep 17, at 14:38, Aaron Denney wrote: On 2008-09-17, Mauricio <[EMAIL PROTECTED]> wrote: Localized reading should be somewhere else, perhaps related to Locales. No! If we had that, string from a program would not be readable by some program running in other machine, or other locale. A

[Haskell-cafe] Re: Float instance of 'read'

2008-09-17 Thread Aaron Denney
On 2008-09-17, Mauricio <[EMAIL PROTECTED]> wrote: >> >> Localized reading should be somewhere else, perhaps related to Locales. > > No! If we had that, string from a program would not > be readable by some program running in other machine, > or other locale. As, actually, you describe below. > Sh

[Haskell-cafe] Re: Float instance of 'read'

2008-09-17 Thread Mauricio
Do you think 'read' (actually, 'readsPrec'?) could be made to also read the international convention (ie., read "1,5" would also work besides read "1.5")? No, as read is really intended to be a language-level tool, not something that you should expose to end users. For local

Re: [Haskell-cafe] Re: Float instance of 'read'

2008-09-17 Thread Lennart Augustsson
Given examples like (1,2,3) I don't see how comma could ever be used instead of dot, unless you insist on whitespace around all commas. And that doesn't look like the right way forward. -- Lennart On Wed, Sep 17, 2008 at 4:20 PM, Mauricio <[EMAIL PROTECTED]> wrote: >>> Do you think 'read' (act

[Haskell-cafe] Re: Float instance of 'read'

2008-09-17 Thread Mauricio
Do you think 'read' (actually, 'readsPrec'?) could be made to also read the international convention (ie., read "1,5" would also work besides read "1.5")? I'm happy to finaly use a language where I can use words of my language to name variables, so I wonder if we could also make that step. The p

[Haskell-cafe] Re: Float instance of 'read'

2008-09-17 Thread Mauricio
As of today, show ((1,2)::(Float,Float)) would not produce that kind of output. Dan Piponi a écrit : Mauricio asked: Do you think 'read' (actually, 'readsPrec'?) could be made to also read the international convention (ie., read "1,5" would also work besides read "1.5")? What would you hope

[Haskell-cafe] Re: Float instance of 'read'

2008-09-17 Thread Mauricio
Do you think 'read' (actually, 'readsPrec'?) could be made to also read the international convention (ie., read "1,5" would also work besides read "1.5")? I'm happy to finaly use a language where I can use words of my language to name variables, so I wonder if we could also make that step. That

[Haskell-cafe] Re: Float instance of 'read'

2008-09-17 Thread Mauricio
I'm happy to finaly use a language where I can use words of my language to name variables, so I wonder if we could also make that step. Really? There is a bunch of languages (like "Glagol") that use words of Russian language as keywords; AFAIK there aren't any Russian programmer who uses them

[Haskell-cafe] Re: Float instance of 'read'

2008-09-17 Thread Mauricio
Maybe. Doubles 'show' function always print something after the decimal separator, so 'show [doubles]' is easy to parse but difficult for human reading. It would be nice to have a space between elements of a shown list, though. It's an annoyance, but internationalization is really great, I think i

[Haskell-cafe] Re: Float instance of 'read'

2008-09-17 Thread Mauricio
No, it is not. Strings created by show are always supposed to be readable by read, no matter which system used 'show' and which system is using 'read'. Maurício Rafael C. de Almeida a écrit : Mauricio wrote: Hi, A small annoyance some users outside english speaking countries usually experimen