/
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. 05.03.2020 at 01:45 am / The Artificers' Duty of Care
  2. 19.02.2020 at 10:25 am / STEM, STEAM and Art
  3. 29.01.2020 at 10:48 am / Code & Shame
  4. 11.01.2019 at 06:39 pm / Clarity of Liskov
  5. 24.01.2016 at 12:00 am / Prayers Like Magic
  6. 28.09.2015 at 12:00 am / Mocking the Law - Excessive Judicial Discretion
  7. 15.06.2015 at 12:00 am / Supposedly Cultivated Tastes
  8. 30.11.2013 at 12:00 am / Particle Oranges
  9. 29.11.2013 at 12:00 am / 勉強 - Straining Studious Strength
© Wan Zafran. See disclaimer.