Skip to content

Design syntax like Haskell's where #1615

@stylewarning

Description

@stylewarning

The Lisp tradition of stacking bindings top-down is reasonably well understood, but in some cases, it's a distraction from the meat of the program. I think we should give an option to put bindings after an expression. Maybe we can use PROGN?

(progn
  (start-gui x)
  (clean-up y)
  (do-laundry clothes)
 :where 
  (start-gui x) =
    (open-blah ...)
  (clean-up y) =
    ...
  (do-laundry z) =
    ...
  clothes = ...)

A big negative with this example is that it's just very different than the rest of the syntax of Coalton.

(let ((foo ...)
      (bar ...))
  ...)

(let x = ...)
(let y = ...)
...

Anyway, something to consider.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions