Re: Curry syntax

From: Wolfgang Lux <>
Date: Thu, 9 Mar 2017 23:37:46 +0100

> Am 09.03.2017 um 17:42 schrieb Andy Jost <>:
> Yes, this is syntactic sugar only. The reason I thought of it: I was trying demonstrate in an introductory way how easy it is to produce a constrained value in Curry. But using &> forces me to explain success and failure, and introduces a "funny" operator. In the end, I felt the demonstration would only give the impression that this sort of thing is technical and complicated, not simple and intuitive like I had hoped.

I see what you are trying to get to. My concern is that the where keyword currently introduces a list of bindings, while in your proposal it would be introducing a list of expressions. My feeling is that in the end using where for two different purposes is going to create more confusion than you gain by the new syntax.

Incidentally, you could use function patterns in mcc to achieve (almost) the same effect with a let expression:
  let (length x) = 3 in x
Note that the parentheses around length x are important to make this a pattern binding.

curry mailing list

Received on So Mär 12 2017 - 18:42:53 CET

This archive was generated by hypermail 2.3.0 : Mo Dez 04 2023 - 07:15:14 CET