Blog of Chat

March 20, 2008

When Is A Functional Program Not A Functional Program?


Also see: Where to Find Technical Support

When Is A Functional Program Not A Functional Program? , John Longley. ICFP 1999.

In an impure functional language, there are programs whose behavior is completely functional (in that they behave extensionally on inputs) but the functions they compute cannot be written in the purely functional fragment of the language. That is, the class of programs with functional behavior is more expressive than the usual class of pure functional programs. In this paper we introduce this extended class of “functional” programs by means of examples in Standard ML, and explore what they might have to offer to programmers and language implementors.

After reviewing some theoretical background, we present some examples of functions of the above kind, and discuss how they may be implemented. We then consider two possible programming applications for these functions: the implementation of a search algorithm, and an algorithm for exact real-number integration. We discuss the advantages and limitations of this style of programming relative to other approaches. We also consider the increased scope for compiler optimizations that these functions would offer.

I like this paper because it shows how some of the most abstract bits of formal logic (realizability models of higher order logic) suggest actual programs you can write.

As a barely-related aside, even a brief look into this realizability stuff also taught me a good deal of humility — for example, it seems that at higher types, what you can represent mathematically depends on the specific notion of computation you’re

Also see: REST2SQL in a Jiffy, with Tagspace for Spice

Also see: Never keep your emotions bottled up

Also see: From C# to Java: Part 5

Also see: From C# to Java: Part 5

Also see: Never keep your emotions bottled up

Also see: Web Access for Visual Studio Team System

Also see: History of Lambda-Calculus and Combinatory logic

Also see: Channel 9 Interview

Also see: Single source code base for Silverlight and WPF solutions

Also see: Number of Types in the .NET Framework

Also see: Never keep your emotions bottled up

Also see: Exception Handling in Running a Business

Also see: Web Access for Visual Studio Team System

Also see: Reliability

Also see: The Dick Button drinking game

Also see: ASP.NET MVC in CodePlex and Extensible Unit Testing

using. So the mathematical consequences of the Church-Turing thesis are rather more subtle than we might initially expect. (Andrej Bauer discusses a related point in more detail in this blog post.)
http://lambda-the-ultimate.org/node/2680

Comments »

The URI to TrackBack this entry is: http://spacechat.blogsome.com/2008/03/20/when-is-a-functional-program-not-a-functional-program-2/trackback/

No comments yet.

RSS feed for comments on this post.

Leave a comment

Line and paragraph breaks automatic, e-mail address never displayed, HTML allowed: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>



Anti-spam measure: please retype the above text into the box provided.

Get free blog up and running in minutes with Blogsome
Theme designed by Jay of onefinejay.com