[Haskell-cafe] Re: Channel9 Interview: Software Composability and theFu ture of Languages

Dougal Stanton ithika at gmail.com
Wed Jan 31 07:11:05 EST 2007


Quoth Bulat Ziganshin, nevermore,
> are you learned to write things in this way? in *my* school, we have
> studied
> 
> f=(a*b+d)*2

Also there's the issue of variable substitution. It gets taught very
early on when algebra is introduced (at least in UK):

  f = x + 3y  and  y = sqrt(4 + n)
  => f = x + 3(sqrt(4 + n))

  (I can't think of a real example at the moment, sorry!)

Unless the calculation for y is extremely arduous you're always taught
to just throw them all together. This really gets across the "equality
by definition" thing that pure FP uses. There's no need to do things in
any particular order.

This is pretty close to how 'straight' function application works; I
don't think we ever did anything like higher order functions in
high-school algebra. Maybe that's the next step --- lambda calculus at
age ten and up! :)

Cheers,

Dougal.


More information about the Haskell-Cafe mailing list