/
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. 18.06.2022 at 06:52 pm / Strangling Deeds
  2. 30.04.2022 at 10:36 am / Masters of A Fraction of A Dot
  3. 14.03.2020 at 09:18 pm / Sheets for People
  4. 13.02.2020 at 10:29 am / The Code Language Lawyers
  5. 03.01.2020 at 10:46 am / Git for Legal Practice
  6. 23.06.2019 at 10:59 am / Mood-Clustered Compositions
  7. 16.12.2017 at 12:00 am / When Defying Simplicity
  8. 12.12.2017 at 12:00 am / Innocent Until Proven Guilty
  9. 10.12.2013 at 12:00 am / Yellow Rails
  10. 04.07.2012 at 12:00 am / When To Not Use Data Structures/Algorithms
© Wan Zafran. See disclaimer.