<div dir="auto">There are certainly cases where lazy pattern matches are important. But IMO they're always *a bit weird*, and deserve that ~ syntactic marker letting people know that *something a bit weird is happening*.</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Jan 5, 2023, 6:18 AM Tom Ellis <<a href="mailto:tom-lists-haskell-cafe-2017@jaguarpaw.co.uk">tom-lists-haskell-cafe-2017@jaguarpaw.co.uk</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Tue, Jan 03, 2023 at 08:22:08AM +0100, Henning Thielemann wrote:<br>
> On Mon, 2 Jan 2023, David Feuer wrote:<br>
> <br>
> > My opinion, for several years, has been that the Haskell designers erred in making outermost patterns<br>
> > lazy by default in let and where, and at the top level. I believe they should have gone with<br>
> > something much simpler:<br>
> > 1. Patterns are strict by default.<br>
> > 2. Variables are lazy by default.<br>
> > 3. Patterns at the top level must be marked lazy.<br>
> > 4. (With bang patterns) Variables at the top level may not be marked strict.<br>
> > <br>
> > That would harmonize the way patterns are handled in let and where with the way they're handled in<br>
> > function arguments and case expressions, as well as removing the outermost-pattern special case which<br>
> > makes the *strictness* of inner patterns surprising.<br>
> <br>
> me too<br>
<br>
I am inclined to agree.  But are there any nasty corner cases<br>
involving recursive bindings?<br>
<br>
> > Unfortunately, I don't think there's much chance of any of these<br>
> > changing in Haskell.<br>
> <br>
> Could start as a nice GHC extension like Strict Haskell.<br>
<br>
I agree, but an easier sell if there aren't nasty corner cases.<br>
<br>
Tom<br>
_______________________________________________<br>
Haskell-Cafe mailing list<br>
To (un)subscribe, modify options or view archives go to:<br>
<a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe" rel="noreferrer noreferrer" target="_blank">http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe</a><br>
Only members subscribed via the mailman list are allowed to post.</blockquote></div>