TITLE: A programming language that can only create algorithms with polynomial runtime?
QUESTION [29 upvotes]: Has someone constructed a programming language that can construct all the algorithms in P, and no others?
I'm interested in this restriction coming from the syntax naturally, as opposed to just being a normal Turing machine with a step-timer attached.

REPLY [3 votes]: Yet another perspective (and IMHO a more natural one) is descriptive complexity theory (check also this Wikipedia article). 
They study the question from a perspective different from the one mentioned by Neel. There are various languages that capture exactly the polynomial time computable functions. One of the most famous ones is FO+LFP.