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

2006-02-05 Thread Tomasz Zielonka
On Sun, Feb 05, 2006 at 06:58:15PM +, Ben Rudiak-Gould wrote:
> Tomasz Zielonka wrote:
> >But then you have a problem when you when you want to add something
> >at the beginning ;-)
> 
> How about:
> 
> id
> . f x y
> . g x
> $ z

Yes, I've thought about it. You are using a neutral element of .,
just like I used [] as a neutral element of ++ (or concat).

Best regards
Tomasz

-- 
I am searching for programmers who are good at least in
(Haskell || ML) && (Linux || FreeBSD || math)
for work in Warsaw, Poland
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


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

2006-02-05 Thread Ben Rudiak-Gould

Tomasz Zielonka wrote:

On Sun, Feb 05, 2006 at 01:14:42PM -, Brian Hulley wrote:

How about:

 f x y
 . g x
 $ z


But then you have a problem when you when you want to add something
at the beginning ;-)


How about:

id
. f x y
. g x
$ z

-- Ben

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


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

2006-02-05 Thread Aaron Denney
On 2006-02-05, Brian Hulley <[EMAIL PROTECTED]> wrote:
> Jon Fairbairn wrote:
>> Brian Hulley wrote:
>>> 
>>
>> 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 reconsidering my position that it's "just" syntax. Syntax does 
> after all carry a lot of semiotics for us humans, and if there are centuries 
> of use of ":" in mathematics that are just to be discarded because someone 
> in some other language decided to use it for list cons then I think it makes 
> sense to correct this.
>
> It would be impossible to get everything right first time, and I think the 
> Haskell committee did a very good job with Haskell, but just as there can be 
> bugs in a program, so there can also be bugs in a language design, and an 
> interesting question is how these can be addressed.
>
> For example, in the Prolog news group several years ago, there was also a 
> discussion about changing the list cons operator, because Prolog currently 
> uses "." which is much more useful for forming composite names - something 
> which I also think has become a de-facto inter-language standard. Although 
> there was much resistance from certain quarters, several implementations of 
> Prolog had in fact changed their list cons operator (list cons is hardly 
> ever needed in Prolog due to the [Head|Tail] sugar) to reclaim the dot for 
> its "proper" use.
>
> 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 for forming lists in natural 
> language, and has the added advantage that (on my keyboard at least) you 
> don't even need to press the shift key! ;-)
>
> Regards, Brian.

If anything, using ',' for block syntax and ';' for lists is backwards.
',' is used for generic lists in English, whereas ';' is used for
seperating statements or lists.

But I like the current syntax just fine.

-- 
Aaron Denney
-><-

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