Comment on Examples of Lisp formatting through historyparentComments−eru14yI actually like the first one best, and would prefer a case-lambda even more. Once it becomes available we can write foo x y = x >>= \case Leaf -> .. Branch l r -> .. modulo whatever syntax gets chosen. That would save an unnecessary temporary variable. (See https://groups.google.com/group/haskell-cafe/browse_thread/t...)Temporary variables clutter up the name space. While reading code you have to look for shadowing, or whether that variable is ever used again.−hollerith14yAgree about case lambda (and consequently that I could have chosen a better example).
Comments
I actually like the first one best, and would prefer a case-lambda even more. Once it becomes available we can write
modulo whatever syntax gets chosen. That would save an unnecessary temporary variable. (See https://groups.google.com/group/haskell-cafe/browse_thread/t...)Temporary variables clutter up the name space. While reading code you have to look for shadowing, or whether that variable is ever used again.
Agree about case lambda (and consequently that I could have chosen a better example).