{"id":14458,"date":"2014-11-07T00:38:11","date_gmt":"2014-11-07T06:38:11","guid":{"rendered":"http:\/\/bucktownbell.com\/?p=14458"},"modified":"2014-11-07T00:38:11","modified_gmt":"2014-11-07T06:38:11","slug":"what-is-the-difference-between-procedural-programming-and-functional-programming","status":"publish","type":"post","link":"http:\/\/bucktownbell.com\/?p=14458","title":{"rendered":"What is the difference between procedural programming and functional programming?"},"content":{"rendered":"<blockquote><p>I&#8217;ve read the Wikipedia articles for both <a href=\"http:\/\/en.wikipedia.org\/wiki\/Procedural_programming\">procedural programming<\/a> and <a href=\"http:\/\/en.wikipedia.org\/wiki\/Functional_programming\">functional programming<\/a>, but I&#8217;m still slightly confused. Could someone boil it down to the core?<\/p><\/blockquote>\n<p>via <a href=\"http:\/\/stackoverflow.com\/questions\/23277\/what-is-the-difference-between-procedural-programming-and-functional-programming\">glossary &#8211; What is the difference between procedural programming and functional programming? &#8211; Stack Overflow<\/a>.<\/p>\n<div class=\"post-text\">\n<blockquote><p>A functional language (ideally) allows you to write a mathematical function, i.e. a function that takes <em>n<\/em> arguments and returns a value. If the program is executed, this function is evaluated.<\/p>\n<p>A procedural language, on the other hand, performs a series of <em>sequential<\/em> steps, where the functional program would be nested. There&#8217;s a way of transforming sequential logic into functional logic called <a href=\"http:\/\/en.wikipedia.org\/wiki\/Continuation_passing_style\">continuation passing style<\/a>.<\/p>\n<p>As a consequence, a purely functional program always yields <em>the same value<\/em> for an input, and the order of evaluation is not well-defined; which means that uncertain values like user input or random values are hard to model in purely functional languages.<\/p><\/blockquote>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>I&#8217;ve read the Wikipedia articles for both procedural programming and functional programming, but I&#8217;m still slightly confused. Could someone boil it down to the core? via glossary &#8211; What is the difference between procedural programming and functional programming? &#8211; Stack &hellip; <a href=\"http:\/\/bucktownbell.com\/?p=14458\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[737],"tags":[1060,261],"class_list":["post-14458","post","type-post","status-publish","format-standard","hentry","category-stem","tag-computer-science","tag-definition"],"_links":{"self":[{"href":"http:\/\/bucktownbell.com\/index.php?rest_route=\/wp\/v2\/posts\/14458","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/bucktownbell.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/bucktownbell.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/bucktownbell.com\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/bucktownbell.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=14458"}],"version-history":[{"count":1,"href":"http:\/\/bucktownbell.com\/index.php?rest_route=\/wp\/v2\/posts\/14458\/revisions"}],"predecessor-version":[{"id":14459,"href":"http:\/\/bucktownbell.com\/index.php?rest_route=\/wp\/v2\/posts\/14458\/revisions\/14459"}],"wp:attachment":[{"href":"http:\/\/bucktownbell.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=14458"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/bucktownbell.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=14458"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/bucktownbell.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=14458"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}