help undertsanding functional programing

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • happycow2
    New Member
    • Nov 2007
    • 1

    help undertsanding functional programing

    Hi, I first want to start off by saying that I’m not a programmer but rather a 3-D animation/ special effects student, however there are allot of concepts that i come across that are some what program related. I have no desire to actually learn programming, but i usually like to get an understanding of how certain programming types work. Right now I’m sort of reading about functional programming, and i want to see if my understanding is correct.

    - A functional language is based of lambda, which basically represents everything as functions.

    -Lambda calculus is like a "fundamenta l" math, where we can build a mathematical system from, equal to what a turning machine does, but more math related

    - In a functional language everything is a function, including data, like numbers

    -we can think of a function as a black box of data, data enters the black box, the black box performs an operation, then spit out a result to other black boxes.

    - A programmer can "connect" these functions (or black boxes) together to form another function, which the can be stored in a library and use as any other function

    -a pure functional language doesn’t use state

    -a state has to do with change, i guess with variables in other languages. for example, if "car = wheel +frame", and later on "car = horse + carriage" that is a state change? while with a functional language, a "car" function will always be "wheel + frame"

    -a pure language has to deal with state when it is getting info from hardware or some where eles. to keep this state from "inpurefyin g" the language, these states are kept in black boxes as well and return a value that will ultimately convert to a function when to is connected to other functions?

    -there are to ways to evaluate functional code, strict, which i guess looks at every function gieven, and lazy, which updates only those functions that need to be updated. Fo instance, if there are ten functions connected together and the 7 function is given a new value that has nothing to do with the other 6 functions, only the 3 function that its output is connected to will update.
Working...