News for hackers. Stuff that matters.
Re:Haskell in the Large [pdf] by the_af on Thursday January 29, 2015 @10:39AM (#8966694)
> But realistically, an unused parameter should probably be removed.

Think about the function if-then-else, which you may be familiar with from your favorite language :)

    if-then-else true branch1 branch2 = branch1
    if-then-else false branch1 branch2 = branch2
Obviously you don't want both branches evaluated in any given invocation, and obviously you cannot remove the unused parameter. Note that the purpose is not to "save computation", since for example branch1 may be undefined if cond is false!

When using a language with support for lazy evaluation, you encounter this kind of functions all the time.

Re:Haskell in the Large [pdf] by tel on Thursday January 29, 2015 @04:41PM (#8969029)
Of course, in OCaml that's just

    if_then_else c t e = 
      match c with
      | true  -> t ()
      | false -> e ()
   
So the question sort of becomes one of how painful thunking or anonymous function syntax is.