/
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. 13.02.2020 at 10:29 am / The Code Language Lawyers
  2. 16.12.2017 at 12:00 am / Sketch, Draft, Craft
  3. 15.12.2017 at 12:00 am / The Breakings of Julia
  4. 22.07.2015 at 12:00 am / Fair Judges of Fair Play
  5. 18.06.2015 at 12:00 am / Crisp Tweets
  6. 13.06.2015 at 12:00 am / Sexism Against Modern Men
  7. 11.12.2013 at 12:00 am / Lighting Wizardry
  8. 29.11.2013 at 12:00 am / 勉強 - Straining Studious Strength
  9. 22.04.2012 at 12:00 am / Ludicrous Ace
  10. 25.09.2010 at 12:00 am / 汗牛充棟
© Wan Zafran. See disclaimer.