Re: [Haskell-cafe] Why is $ right associative instead of leftassociative?

2006-02-12 Thread Marcin 'Qrczak' Kowalczyk
Brian Hulley [EMAIL PROTECTED] writes: My final suggestion if anyone is interested is as follows: 1) Use : for types 2) Use , instead of ; in the block syntax so that all brace blocks can be replaced by layout if desired (including record blocks) 3) Use ; for list cons. ; is already used

Re: [Haskell-cafe] Why is $ right associative instead of leftassociative?

2006-02-05 Thread Jon Fairbairn
On 2006-02-04 at 21:15GMT Brian Hulley wrote: Stefan Holdermans wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Brian wrote: I think the mystery surrounding :: and : might have been that originally people thought type annotations would hardly ever be needed whereas list cons

Re: [Haskell-cafe] Why is $ right associative instead of leftassociative?

2006-02-05 Thread Brian Hulley
Jon Fairbairn wrote: Brian Hulley wrote: snip Not exactly alone; I've felt it was wrong ever since we argued about it for the first version of Haskell. : for typing is closer to common mathematical notation. But it's far too late to change it now. - it's just syntax after all Well I'm

Re: [Haskell-cafe] Why is $ right associative instead of leftassociative?

2006-02-05 Thread Brian Hulley
Tomasz Zielonka wrote: The only problem I see right now is related to change locality. If I have a chain like this: f x y . g x $ z and I want to add some transformation between g and z I have to change one line and insert another f x y . g x . h x y $ z With

Re: [Haskell-cafe] Why is $ right associative instead of leftassociative?

2006-02-05 Thread Brian Hulley
Tomasz Zielonka wrote: On Sun, Feb 05, 2006 at 01:14:42PM -, Brian Hulley wrote: How about: f x y . g x $ z then you only need to add the line . h x y But then you have a problem when you when you want to add something at the beginning ;-) With right-assoc $ adding

Re: [Haskell-cafe] Why is $ right associative instead of leftassociative?

2006-02-05 Thread Tomasz Zielonka
On Sun, Feb 05, 2006 at 04:36:44PM -, Brian Hulley wrote: Just in case you are interested, in the preprocessor I'm writing, I would write these examples as: (.) # f x y g x h x y $ z and a = #[

Re: [Haskell-cafe] Why is $ right associative instead of leftassociative?

2006-02-05 Thread Tomasz Zielonka
On Sun, Feb 05, 2006 at 01:10:24PM -, Brian Hulley wrote: 2) Use , instead of ; in the block syntax so that all brace blocks can be replaced by layout if desired (including record blocks) Wouldn't it be better to use ; instead of , also for record syntax? Best regards Tomasz -- I am

Re: [Haskell-cafe] Why is $ right associative instead of leftassociative?

2006-02-05 Thread Brian Hulley
Tomasz Zielonka wrote: On Sun, Feb 05, 2006 at 01:10:24PM -, Brian Hulley wrote: 2) Use , instead of ; in the block syntax so that all brace blocks can be replaced by layout if desired (including record blocks) Wouldn't it be better to use ; instead of , also for record syntax? I

Re: [Haskell-cafe] Why is $ right associative instead of leftassociative?

2006-02-05 Thread Brian Hulley
Tomasz Zielonka wrote: On Sun, Feb 05, 2006 at 04:36:44PM -, Brian Hulley wrote: Just in case you are interested, in the preprocessor I'm writing, I would write these examples as: (.) # f x y g x h x y $ z and a =

Re: [Haskell-cafe] Why is $ right associative instead of leftassociative?

2006-02-04 Thread Brian Hulley
Brian Hulley wrote: Tomasz Zielonka wrote: On Sat, Feb 04, 2006 at 02:52:20PM -, Brian Hulley wrote: Hi - In the Haskell98 report section 4.4.2 $ is specified as being right associative. This means that f $ a0 a1 $ b0 b1 would parse as f (a0 a1 (b0 b1)) which seems rather strange to me.

Re: [Haskell-cafe] Why is $ right associative instead of leftassociative?

2006-02-04 Thread Tomasz Zielonka
On Sat, Feb 04, 2006 at 07:15:47PM -, Brian Hulley wrote: I think the mystery surrounding :: and : might have been that originally people thought type annotations would hardly ever be needed whereas list cons is often needed, but now that it is regarded as good practice to put a type

Re: [Haskell-cafe] Why is $ right associative instead of leftassociative?

2006-02-04 Thread Stefan Holdermans
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Brian wrote: I think the mystery surrounding :: and : might have been that originally people thought type annotations would hardly ever be needed whereas list cons is often needed, but now that it is regarded as good practice to put a type

Re: [Haskell-cafe] Why is $ right associative instead of leftassociative?

2006-02-04 Thread Brian Hulley
Tomasz Zielonka wrote: On Sat, Feb 04, 2006 at 07:15:47PM -, Brian Hulley wrote: I think the mystery surrounding :: and : might have been that originally people thought type annotations would hardly ever be needed whereas list cons is often needed, but now that it is regarded as good

Re: [Haskell-cafe] Why is $ right associative instead of leftassociative?

2006-02-04 Thread Brian Hulley
Stefan Holdermans wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Brian wrote: I think the mystery surrounding :: and : might have been that originally people thought type annotations would hardly ever be needed whereas list cons is often needed, but now that it is regarded as good

Re: [Haskell-cafe] Why is $ right associative instead of leftassociative?

2006-02-04 Thread Paul Hudak
Actually, one of the main reasons that we chose (:) is that that's what Miranda used. So, at the time at least, it was not entirely clear what the de facto universal inter-language standard was. In any case, I agree with Stefan regarding Haskell Prime! -Paul Stefan Holdermans wrote:

Re: [Haskell-cafe] Why is $ right associative instead of leftassociative?

2006-02-04 Thread Cale Gibbard
On 04/02/06, Brian Hulley [EMAIL PROTECTED] wrote: Stefan Holdermans wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Brian wrote: I think the mystery surrounding :: and : might have been that originally people thought type annotations would hardly ever be needed whereas list

Re: [Haskell-cafe] Why is $ right associative instead of leftassociative?

2006-02-04 Thread Jared Updike
[a,b,c ; tail] === a :: b :: c :: tail -- where :: How is [a,b,c ; tail] simpler, clearer or less typing than a:b:c:tail ? I think that the commas and semicolons are easy to confuse. While we're talking about the aesthetics of :: and :, I like how a line with a

Re: [Haskell-cafe] Why is $ right associative instead of leftassociative?

2006-02-04 Thread Chris Kuklewicz
Brian Hulley wrote: Jared Updike wrote: [a,b,c ; tail] === a :: b :: c :: tail -- where :: How is [a,b,c ; tail] simpler, clearer or less typing than a:b:c:tail ? I think that the commas and semicolons are easy to confuse. It seems strange that you can write

Re: [Haskell-cafe] Why is $ right associative instead of leftassociative?

2006-02-04 Thread Bill Wood
On Sat, 2006-02-04 at 23:34 +, Chris Kuklewicz wrote: . . . But this implies [a,b,c,[]..] is the same as [a,b,c] and [a,b,c,[d,e,f]..] is the same as [a,b,c,d,e,f] and [a,b,c,[d,e,f..]..] is [a,b,c,d,e,f..] Hmmm, does this get us to difference lists ala Prolog? -- Bill Wood

Re: [Haskell-cafe] Why is $ right associative instead of leftassociative?

2006-02-04 Thread ajb
G'day all. Quoting Paul Hudak [EMAIL PROTECTED]: Actually, one of the main reasons that we chose (:) is that that's what Miranda used. So, at the time at least, it was not entirely clear what the de facto universal inter-language standard was. Exactly. One point that's often not

Re: [Haskell-cafe] Why is $ right associative instead of leftassociative?

2006-02-04 Thread Brian Hulley
[EMAIL PROTECTED] wrote: G'day all. Quoting [EMAIL PROTECTED]: This is the way that I normally express it. Partly because I find function application FAR more natural than right-associative application, I meant to say that I find function COMPOSITION more natural than right-associative

Re: [Haskell-cafe] Why is $ right associative instead of leftassociative?

2006-02-04 Thread Joseph H. Fasel III
These lineages are more or less right, except that there is a bit of incest: LML is certainly one of the progenitors of Haskell. (more semantically than syntactically, though) Cheers, --Joe [EMAIL PROTECTED] said: G'day all. Quoting Paul Hudak [EMAIL PROTECTED]: Actually, one of the main