Sunday, February 14, 2010
Correctness of Programming
When we try to write everything as function, or in another word, for imperative programming language, we write everything composably from the basic function. The basic function is something correctness is definitely guaranteed. And we use Dikjstra 's great method-"structure programming", try to compose program from 'atom' to bigger one, increasingly--but I want to push it to extreme, everything in the big program is composed by a strictly smaller one, then the final function is the outer layer, and the basic element is from the 'atom'. In this style(which I will call it well-founded structure programming), I intuitionisticly feel that this kind of program, we can always check whether is correct or not. I have this intuition feeling because, I write program ill form most of the time, or in fact, I write the whole program as an 'atom', then it's really hard to guarantee the correctness. But once I figure out each part of the program actually can be written as a smaller function, then the checking of whether my whole program is well behaved can be done much easily.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment