/
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. 30.04.2022 at 10:36 am / Masters of A Fraction of A Dot
  2. 27.06.2021 at 12:49 pm / Eloquent Javascript / Chapter 2, Exercise 03
  3. 25.08.2020 at 09:03 pm / Hamstrung Limitations
  4. 10.01.2020 at 10:40 am / Learned Lumber
  5. 21.08.2018 at 10:59 am / Roses as Time
  6. 18.05.2015 at 12:00 am / Indian Judicial Writing
  7. 07.07.2014 at 12:00 am / If I Cannot Strengthen Our Bench
  8. 02.12.2013 at 12:00 am / Coloured Plasmids
  9. 30.11.2013 at 12:00 am / Particle Oranges
© Wan Zafran. See disclaimer.