/
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. 13.02.2020 at 10:29 am / The Code Language Lawyers
  2. 05.02.2020 at 10:26 pm / Nostalgic Raging Streets
  3. 14.09.2019 at 12:00 am / Narratives Hold
  4. 23.06.2019 at 10:59 am / Mood-Clustered Compositions
  5. 14.12.2018 at 03:09 pm / Recursion, Succinctly Put
  6. 21.08.2018 at 10:59 am / Roses as Time
  7. 21.12.2015 at 12:00 am / Emails and English Weather
  8. 08.11.2013 at 12:00 am / Red Riding Hood's Examination-in-Chief
  9. 19.03.2012 at 12:00 am / Lush Exoplanets
  10. 17.03.2012 at 12:00 am / Upper and Lower Hengsha
© Wan Zafran. See disclaimer.