/
03.12.2017 at 12:00 am
Cuttings

Declarative, Imperative, Functional Sandwiches

Programming paradigms and sandwiches.

... Declarative programming says, "Make me a sandwich."

Imperative programming says, "Get peanut butter. Get a knife. Get bread. Scoop peanut butter using the knife. Spread peanut butter knife over bread."

Functional programming says (and here the analogy breaks down a little), "Transform a closed jar of peanut butter into an open jar of peanut butter. Transform the open jar of peanut butter and a knife into a knife with peanut butter on it. Transform the knife and a slice of bread into a sandwich."

- Reddit

Filed under:
#
Words: 95 words approx.
Time to read: 0.38 mins (at 250 wpm)
Keywords:
, , , , , , , , ,

Other suggested posts

  1. 15.06.2022 at 01:04 am / Prepackaged Thought Cassettes
  2. 29.09.2020 at 12:24 pm / Rays of Circumstance
  3. 16.09.2019 at 10:32 am / Legal Practice & Taking From Software Best Practices
  4. 17.12.2017 at 12:00 am / To Know C
  5. 15.12.2017 at 12:00 am / The Breakings of Julia
  6. 23.07.2015 at 12:00 am / The Line Between Gifts and Bribes
  7. 14.06.2015 at 12:00 am / Just the Two of Us (6-Bar Guitar/Sax Copy)
  8. 29.11.2013 at 12:01 am / 美しい - Beautifully Woolly
  9. 28.11.2013 at 12:00 am / ケチ - Scroogean Niggardliness
  10. 20.04.2012 at 12:00 am / A Misty Morgue's Bat
© Wan Zafran. See disclaimer.