/
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. 09.07.2023 at 11:38 am / Non-Dissonant Speed Keybindings
  2. 29.03.2023 at 09:38 am / Moving Away from Todoist - to Taskwarrior, SSH & Dropbox - Part 1
  3. 23.03.2023 at 11:12 am / Copywork vs Master Studies
  4. 23.02.2021 at 09:34 pm / Counsel Citing Adverse Authorities
  5. 04.06.2020 at 09:43 am / A Traveling Minstrel's Piano
  6. 30.12.2018 at 10:06 pm / Castles and Air
  7. 03.01.2017 at 12:00 am / Debugging: Twice As Hard As Writing Code
  8. 28.06.2015 at 12:00 am / No Social Transformation Without Representation
  9. 05.07.2014 at 12:00 am / Jack Hamm on (Artistic) Practice
  10. 28.08.2010 at 12:00 am / 身から出た錆
© Wan Zafran. See disclaimer.