C ++ functional programming (6) Action Guide

Source: Internet
Author: User

Original article: http://www.altdevblogaday.com/2012/04/26/functional-programming-in-c/

Author: John Carmack

-Pan Hong

-March January 2013

-Email:
Popyy@netease.com

-Weibo.com/panhong101

Study some of the functions in your code library, track the various external States they will touch, and the various data they will modify. Even if you haven't made any changes to the code, you can get a good document by writing comments to the results. If another function can update the screen through the rendering system, you can raise your hand to announce what mechanisms are beyond human understanding in the code.

The next step is to start thinking about how these functions work. Collect program input, pass them into a pure function, and finally obtain and process those results.

While debugging the Code, be cautious with status changes and implicit parameters. They often mask the actual situation of the program running.

Modify some tool object code, and change the function of changing the object to copy the returned result. Try to add the const modifier before each non-iterator object used.

References:

Http://www.haskell.org/haskellwiki/Introduction

Http://lisperati.com/

Http://www.johndcook.com/blog/tag/functional-programming/

Http://www.cs.kent.ac.uk/people/staff/dat/miranda/whyfp90.pdf

Http://channel9.msdn.com/Shows/Going+Deep/Lecture-Series-Erik-Meijer-Functional-Programming-Fundamentals-Chapter-1

Http://www.cs.utah.edu /~ Hal/docs/daume02yaht.pdf

Http://www.cs.cmu.edu /~ Crary/819-f09/backus78.pdf

Http://fpcomplete.com/the-downfall-of-imperative-programming/

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.