DEV Community

Discussion on: Teaching Functional Programming: Two Big Picture Approaches

Collapse
 
kspeakman profile image
Kasey Speakman • Edited

P.S. I love the apple example. In fact, the red delicious apple is not actually red. Rather it reflects the red spectrum of light into our eyeballs so we perceive red when looking at it. And the same goes for any item with color, plus white reflects most of the light spectrum and black absorbs most of it. I find that deeply interesting.

Related: Vantablack

Collapse
 
antonrich profile image
Anton

It becomes like 2d. Interesting.

Collapse
 
eddroid profile image
Ed Toro • Edited

To expand on this a bit, one point in favor of FP's model is that, in various scientific senses, the world may actually be functional.

The apple isn't necessarily red. It just reflects red when you shine wide spectrum light on it. It'll appear as a different color with other spectrums of light (or none at all). So "being red" can be modeled as a function whose outputs depend on its inputs.

If you think that's a superior model of the concept of color, you may be a functionalist. (That sounds like the beginning of a joke/meme.)