/
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
Source: Reddit
Filed under:
#
Words: 8 words approx.
Time to read: 0.03 mins (at 250 wpm)
Keywords:
, , , , ,

Other suggested posts

  1. 18.10.2022 at 09:36 am / The Airplane Test of Fluency
  2. 31.07.2022 at 10:08 pm / Hades And (Non-Ending) Desk Jobs
  3. 10.07.2021 at 01:46 pm / Plants Are Maths
  4. 27.04.2020 at 07:11 pm / How Science Should Be
  5. 29.08.2018 at 11:06 am / Damascus Differences
  6. 11.07.2016 at 12:00 am / SublimeREPL's Slow Printing/Freezing - A Solution
  7. 29.11.2013 at 12:00 am / 勉強 - Straining Studious Strength
  8. 03.07.2013 at 12:00 am / Craft Versus Discipline
  9. 15.03.2012 at 12:00 am / Cel-Shaded Arena
  10. 15.08.2010 at 12:00 am / 海老
© Wan Zafran. See disclaimer.