[Haskell-cafe] I Need a Better Functional Language!
es at ertes.de
Tue Apr 10 14:03:46 CEST 2012
Tillmann Rendel <rendel at informatik.uni-marburg.de> wrote:
> > I am curious what are interesting use-cases for that? Symbolic
> > analysis? self-compilers?
> Optimization. For example, imagine the following definition of
> function composition:
> map f . map g = map (f . g)
> f . g = \x -> f (g x)
> In Haskell, we cannot write this, because we cannot pattern match on
> function calls.
Static optimizations like this one can be done, when you have an
abstraction layer above the actual functions. In fact you can even
write efficient statically and dynamically self-organizing networks of
functions, as long as there is an algebraic type to support it.
nightmare = unsafePerformIO (getWrongWife >>= sex)
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 836 bytes
Desc: not available
More information about the Haskell-Cafe