hazel icon indicating copy to clipboard operation
hazel copied to clipboard

Create a new input syntax for function.

Open DavidFangWJ opened this issue 4 months ago • 3 comments

Motivation

Add a more compact syntax to function, such that

let f(x : A, y: B): C = 
  e

should behave the same as below:

let f : (A, B) -> C = 
  fun (x, y) -> e

This new function syntax is more analogous to other programming languages with strong data types, and is therefore easier to learn.

Implementation Strategy

I believe that it will mostly be a modification of Form.re.

  • [ ] Add new syntax expression
  • [ ] Make sure that its further processing is identical to existing function syntax

DavidFangWJ avatar Mar 25 '24 13:03 DavidFangWJ