Why is $ right associative instead of left associative?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
41 messages Options
123
Reply | Threaded
Open this post in threaded view
|

Re: Why is $ right associative instead of leftassociative?

Brian Hulley
[hidden email] wrote:

> G'day all.
>
> Quoting [hidden email]:
>
>> 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 application.  It certainly fits better with my
> personal biases about good functional programming style.

Yes the case you've made for $ being left associative is very compelling -
namely that the existing associativity actively encourages a *bad*
programming style in which the right associative $ hides the composition in
a chain of function applications instead of allowing the composition to be
explicit and neatly separate from its argument.

Moreover, the existing associativity of $ implies that whoever thought it up
was confusing two concepts: application and composition, instead of allowing
"$" to take its proper place as an equal citizen to ".", with the
associativity proper to its role as application alone.

Thus if $ were made left associative in Haskell Prime, this would add
clarity to the thought forms associated with the language, which would
(presumably) in turn lead to better programs being written in it.

Regards, Brian.


_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/haskell-cafe
Reply | Threaded
Open this post in threaded view
|

Re: Why is $ right associative instead of left associative?

Ben Rudiak-Gould
In reply to this post by Brian Hulley
No one has mentioned yet that it's easy to change the associativity of $
within a module in Haskell 98:

     import Prelude hiding (($))

     infixl 0 $
     f$x = f x

or, for the purists,

     import Prelude hiding (($))
     import qualified Prelude (($))

     infixl 0 $
     ($) = (Prelude.$)

-- Ben

_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/haskell-cafe
Reply | Threaded
Open this post in threaded view
|

Re: Why is $ right associative instead of leftassociative?

Joseph H. Fasel III
In reply to this post by ajb@spamcop.net
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

[hidden email] said:

> G'day all.
>
> Quoting Paul Hudak <[hidden email]>:
>
>> 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 appreciated is that Haskell is not
> a descendent of ML.  The ML lineage is, roughly:
>
>     Lisp -> ISWIM -> ML -> SML, LML, O'Caml etc
>
> And the Haskell lineage is:
>
>     Lisp -> ISWIM -> SASL -> KRC -> Miranda -> Haskell
>
> ML is much more like an older cousin than an ancestor.
>
> This point is important because Turner languages already had a list
> syntax at the time that they adopted an ML-like type system.
>
> Cheers,
> Andrew Bromage
> _______________________________________________
> Haskell-Cafe mailing list
> [hidden email]
> http://www.haskell.org/mailman/listinfo/haskell-cafe
>


Joseph H. Fasel, Ph.D.                  email: [hidden email]
Stockpile-Complex Modeling and Analysis phone: +1 505 667 7158
University of California                fax: +1 505 667 2960
Los Alamos National Laboratory          post: D-2 MS F609; Los Alamos, NM
87545

_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/haskell-cafe
Reply | Threaded
Open this post in threaded view
|

Re: Why is $ right associative instead of leftassociative?

Jon Fairbairn
In reply to this post by Brian Hulley
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 is often needed, but now that it is
> >> regarded as good practice to put a type annotation before every top
> >> level value binding, and as the type system becomes more and more
> >> complex (eg with GADTs etc), type annotations are now presumably far
> >> more common than list cons so it would be good if Haskell Prime
> >> would swap these operators back to their de facto universal
> >> inter-language standard of list cons and type annotation
> >> respectively.
> >
> > I don't think Haskell Prime should be about changing the look and
> > feel of the language.
>
> Perhaps it is just a matter of aesthetics about :: and :, but I really feel
> these symbols have a de-facto meaning that should have been respected and
> that Haskell Prime would be a chance to correct this error. However no doubt
> I'm alone in this view so fair enough

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

It is indeed.

  Jón

--
Jón Fairbairn                              Jon.Fairbairn at cl.cam.ac.uk


_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/haskell-cafe
Reply | Threaded
Open this post in threaded view
|

Re: Why is $ right associative instead of left associative?

Tomasz Zielonka
In reply to this post by ajb@spamcop.net
On Sat, Feb 04, 2006 at 07:02:52PM -0500, [hidden email] wrote:
> G'day all.

Hello!

> Quoting Tomasz Zielonka <[hidden email]>:
>
> > Probably it was anticipated that right associative version will
> > be more useful. You can use it to create a chain of transformations,
> > similar to a chain of composed functions:
> >
> >     (f . g . h) x   =   f $ g $ h $ x
>
> Of course, if $ were left-associative, it would be no less useful here,
> because you could express this chain thusly:
>
>     f . g . h $ x

OK, I can be persuaded to use this style. I like function composition
much more than $ :-)

> This is the way that I normally express it.  Partly because I find
> function application FAR more natural than right-associative application,
> and partly because I'm hedging my bets for Haskell 2 just in case the
> standards committee wakes up and notices that the associativity of $ is
> just plain wrong and decides to fix it. :-)

Is there any chance that Haskell' will change the definition of $ ?

Well, if there is any moment where we can afford introducing backward
incompatible changes to Haskell', I think it's now or never!

> In fact, I'll go out on a limb and claim that ALL such uses of $ are
> better expressed with composition.  Anyone care to come up with a
> counter-example?

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 right-associative $ it would be only one line-add. Probably not a
very strong argument.

> > But of course, left associative version can also be useful. Some
> > time ago I used a left associative version of the strict application
> > operator, which I named (!$).
>
> In fact, I think it's much MORE useful, and for precisely the reason
> that you state: it makes strict application much more natural.

Agreed.

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
[hidden email]
http://www.haskell.org/mailman/listinfo/haskell-cafe
Reply | Threaded
Open this post in threaded view
|

Re: Re: Why is $ right associative instead of left associative?

Tomasz Zielonka
In reply to this post by Ben Rudiak-Gould
On Sun, Feb 05, 2006 at 02:27:45AM +0000, Ben Rudiak-Gould wrote:

> No one has mentioned yet that it's easy to change the associativity of $
> within a module in Haskell 98:
>
>     import Prelude hiding (($))
>
>     infixl 0 $
>     f$x = f x
>
> or, for the purists,
>
>     import Prelude hiding (($))
>     import qualified Prelude (($))
>
>     infixl 0 $
>     ($) = (Prelude.$)

But that would break Copy & Paste between modules! ;-)

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
[hidden email]
http://www.haskell.org/mailman/listinfo/haskell-cafe
Reply | Threaded
Open this post in threaded view
|

Re: Why is $ right associative instead of leftassociative?

Brian Hulley
In reply to this post by Jon Fairbairn
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 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.


_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/haskell-cafe
Reply | Threaded
Open this post in threaded view
|

Re: Why is $ right associative instead of leftassociative?

Brian Hulley
In reply to this post by Tomasz Zielonka
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 right-associative $ it would be only one line-add. Probably not a
> very strong argument.

How about:

      f x y
      . g x
      $ z

then you only need to add the line

      . h x y

This is similar to how people often format lists:

     a =
          [ first
          , second
          , third
          ]

Regards, Brian.
_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/haskell-cafe
Reply | Threaded
Open this post in threaded view
|

Re: Why is $ right associative instead of leftassociative?

Tomasz Zielonka
On Sun, Feb 05, 2006 at 01:14:42PM -0000, 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 at both ends is OK.

> This is similar to how people often format lists:
>
>     a =
>          [ first
>          , second
>          , third
>          ]

I am one of those people, and I am slightly annoyed with I have to
add something at the beginning of the list. I even went so far that
when I had a list of lists, which were concatenated, I've put an
empty list at front:

    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
[hidden email]
http://www.haskell.org/mailman/listinfo/haskell-cafe
Reply | Threaded
Open this post in threaded view
|

Re: Why is $ right associative instead of leftassociative?

Brian Hulley
Tomasz Zielonka wrote:

> On Sun, Feb 05, 2006 at 01:14:42PM -0000, 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 at both ends is OK.
>
>> This is similar to how people often format lists:
>>
>>     a =
>>          [ first
>>          , second
>>          , third
>>          ]
>
> I am one of those people, and I am slightly annoyed with I have to
> add something at the beginning of the list. I even went so far that
> when I had a list of lists, which were concatenated, I've put an
> empty list at front:
>
>    concat $
>        [ []
>        , [...]
>        , [...]
>        .
>        .
>        .
>        ]

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 = #[
                    first
                    second
                    third

where exp #> {e0,e1,...} is sugar for let a = exp in a e0 (a e1 (a ... )
...)) and #[ {e0, e1, ... } is sugar for [e0, e1, ...]            (exp #>
block and exp #< block are the right and left associative versions
respectively and the special # sugar allows a layout block to be started if
it occurs at the end of a line)

This allows me to avoid having to type lots of syntax eg repeating the "."
all the time and focus on the semantics...

Regards, Brian.

_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/haskell-cafe
Reply | Threaded
Open this post in threaded view
|

Re: Why is $ right associative instead of leftassociative?

Tomasz Zielonka
On Sun, Feb 05, 2006 at 04:36:44PM -0000, 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 = #[
>                    first
>                    second
>                    third
>
> where exp #> {e0,e1,...} is sugar for let a = exp in a e0 (a e1 (a ... )
> ...)) and #[ {e0, e1, ... } is sugar for [e0, e1, ...]            (exp #>
> block and exp #< block are the right and left associative versions
> respectively and the special # sugar allows a layout block to be started if
> it occurs at the end of a line)

Well... I care about change locality and the like, but I'm not sure
I would use such syntax (as a means of communication between
programmers). Perhaps that's because I am not used to it and it looks
alien. But it's rather because I still put readability first.

> This allows me to avoid having to type lots of syntax eg repeating the "."
> all the time and focus on the semantics...

At some point you (the programmer) are going to do the work of a
compression program ;-)

There is some limit to terseness. Haskell's syntax is quite concise, but
it could be even more. Why it isn't? Because it would cease to resemble
the mathematical notation, it would cease to be readable. Well, even
Haskell could be more readable, but there's also some point where
further investment in concise lexical syntax doesn't pay off. I am not
sure that's the situation here, but... think about it.

PS. One wonders why you don't take the lisp way with a good lisp editor?
    Aren't you designing lisp without parentheses? ;-)

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
[hidden email]
http://www.haskell.org/mailman/listinfo/haskell-cafe
Reply | Threaded
Open this post in threaded view
|

Re: Why is $ right associative instead of leftassociative?

Aaron Denney
In reply to this post by Brian Hulley
On 2006-02-05, Brian Hulley <[hidden email]> wrote:

> 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 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
[hidden email]
http://www.haskell.org/mailman/listinfo/haskell-cafe
Reply | Threaded
Open this post in threaded view
|

Re: Why is $ right associative instead of leftassociative?

Tomasz Zielonka
In reply to this post by Brian Hulley
On Sun, Feb 05, 2006 at 01:10:24PM -0000, 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 searching for programmers who are good at least in
(Haskell || ML) && (Linux || FreeBSD || math)
for work in Warsaw, Poland
_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/haskell-cafe
Reply | Threaded
Open this post in threaded view
|

Re: Why is $ right associative instead of leftassociative?

Brian Hulley
Tomasz Zielonka wrote:
> On Sun, Feb 05, 2006 at 01:10:24PM -0000, 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 thought of this also, but the nice thing about using commas everywhere is
that it is consistent with tuples and lists:

    [a,b,c]
    (a,b,c)
    {a,b,c}

I admit it takes some getting used to to write:

    map f (h;t) = f h;map f t

but you couldn't use commas in tuple syntax if they were also used as list
cons.

Also, I'm using

    test :{Eq a, Show a} a -> ()

instead of

    test :: (Eq a, Show a) => a->()

and the comma here is particularly nice because it suggests a set, which is
exactly what the context is.

Regards, Brian.

_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/haskell-cafe
Reply | Threaded
Open this post in threaded view
|

Re: Why is $ right associative instead of leftassociative?

Ben Rudiak-Gould
In reply to this post by Tomasz Zielonka
Tomasz Zielonka wrote:
> On Sun, Feb 05, 2006 at 01:14:42PM -0000, 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
[hidden email]
http://www.haskell.org/mailman/listinfo/haskell-cafe
Reply | Threaded
Open this post in threaded view
|

Re: Re: Why is $ right associative instead of leftassociative?

Tomasz Zielonka
On Sun, Feb 05, 2006 at 06:58:15PM +0000, 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
[hidden email]
http://www.haskell.org/mailman/listinfo/haskell-cafe
Reply | Threaded
Open this post in threaded view
|

Re: Why is $ right associative instead of left associative?

Bill Wood-3
In reply to this post by Tomasz Zielonka
On Sun, 2006-02-05 at 13:49 +0100, Tomasz Zielonka wrote:
   . . .
> 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 right-associative $ it would be only one line-add. Probably not a
> very strong argument.

Maybe stronger than you think.  I know that one of the arguments for
making ";" a C-style delimiter rather than a Pascal-style separator is
that adding a new statement at the end of a series is error-prone -- one
tends to forget to add the ";" in front of the new statement (and one
reason Pascal syntax included the "null" statement was so that "s1;"
would parse as "s1; null", making ";" a de facto delimiter).

Editing ease matters more than a little.

 -- Bill Wood


_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/haskell-cafe
Reply | Threaded
Open this post in threaded view
|

Re: Why is $ right associative instead of leftassociative?

Brian Hulley
In reply to this post by Tomasz Zielonka
Tomasz Zielonka wrote:

> On Sun, Feb 05, 2006 at 04:36:44PM -0000, 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 = #[
>>                    first
>>                    second
>>                    third
>>
>> where exp #> {e0,e1,...} is sugar for let a = exp in a e0 (a e1 (a
>> ... ) ...)) and #[ {e0, e1, ... } is sugar for [e0, e1, ...]
>> (exp #> block and exp #< block are the right and left associative
>> versions respectively and the special # sugar allows a layout block
>> to be started if it occurs at the end of a line)
>
> Well... I care about change locality and the like, but I'm not sure
> I would use such syntax (as a means of communication between
> programmers). Perhaps that's because I am not used to it and it looks
> alien. But it's rather because I still put readability first.

It is true that it looks quite alien at first, but consider that it allows
you to use longer identifiers for function names (because they now only need
to be written once) which could actually enhance readability eg

           Prelude.compose #>
                  f x y
                  g x
                  h x y
           $ z

so perhaps people would start using more real words instead of obscure
symbols like >=+=< etc. Also, the less use of infix notation the better,
because every infix symbol requires the reader to search for the fixity
declaration then try to simulate a precedence parser at the same time as
grappling with the semantics of the code itself. The #>, #< notation solves
this problem by making the sugared associativity immediately visible, and
the use of layout further enhances the direct visual picture of what's
happening.

Anyway it's just an idea I thought I'd share- I'm sure there's no danger of
it ever ending up in a future Haskell... ;-)

Regards, Brian.

_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/haskell-cafe
Reply | Threaded
Open this post in threaded view
|

Re: Why is $ right associative instead of leftassociative?

Henning Thielemann
In reply to this post by Tomasz Zielonka

On Sun, 5 Feb 2006, Tomasz Zielonka wrote:

> On Sun, Feb 05, 2006 at 01:14:42PM -0000, Brian Hulley wrote:
>
> > This is similar to how people often format lists:
> >
> >     a =
> >          [ first
> >          , second
> >          , third
> >          ]
>
> I am one of those people, and I am slightly annoyed with I have to
> add something at the beginning of the list.

In this case I prefer the non-sugar variant:

a =
    first :
    second :
    third :
    []


_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/haskell-cafe
Reply | Threaded
Open this post in threaded view
|

Re: Why is $ right associative instead of left associative?

ajb@spamcop.net
In reply to this post by Tomasz Zielonka
G'day all.

Quoting Tomasz Zielonka <[hidden email]>:

> Is there any chance that Haskell' will change the definition of $ ?
>
> Well, if there is any moment where we can afford introducing backward
> incompatible changes to Haskell', I think it's now or never!

I'm not convinced about this.  The purpose of Haskell', as I understand
it, is to fix the problem that no large Haskell programs (to a first
approximation) are valid H98 because they require some quite reasonable
language extensions.

Partly this is because research is an ongoing area.  Partly this is
because the purpose of H98 was to make a simple language suitable for
teaching.

There _is_ a time coming when H98's true successor will need to be made.
I'm not convinced that that time is now or never.

Cheers,
Andrew Bromage
_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/haskell-cafe
123