[Haskell-cafe] Re: Why functional programming matters

Robin Green greenrd at greenrd.org
Thu Jan 24 12:35:39 EST 2008


On Thu, 24 Jan 2008 10:29:23 -0600
Derek Elkins <derek.a.elkins at gmail.com> wrote:

> Doing it in the IDE would a) require much more from most IDEs and b)
> be almost entirely useless.  Most IDEs don't even get as far as
> parsing the code, even the the best rarely know much about the actual
> semantics of the language.  This would require a rather deep analysis
> and ultimately it is undecidable.  Practically speaking, having such
> a feature in the IDE would be useless unless the programming style of
> most "imperative" programmers changed dramatically.  The only
> functions such an analysis would say were pure are those that were
> rather trivial.  Either way, having such a feature in the IDE doesn't
> really help.  A purity checker in the IDE isn't going to help when
> the function/method is unknown, e.g. when I write a function/method
> that takes a function or an object.  A "purity annotation" would have
> to be at the language level, short of doing a whole-program analysis
> which would be infeasible.

Indeed - JML (Java Modelling Language) takes exactly this approach.
-- 
Robin


More information about the Haskell-Cafe mailing list