/
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. 31.07.2022 at 10:08 pm / Hades And (Non-Ending) Desk Jobs
  2. 02.01.2020 at 11:48 am / Theory and Theatre
  3. 23.08.2018 at 01:33 am / Darwin's Details
  4. 08.02.2016 at 12:00 am / Eye to Eye (Jonathan Young's Version)
  5. 06.10.2015 at 08:02 am / Subservient/Servile Written Malay
  6. 06.09.2015 at 12:00 am / Big Illegal Guns
  7. 18.05.2015 at 12:00 am / Indian Judicial Writing
  8. 16.02.2014 at 12:00 am / Don't Care Too Much About Gear
  9. 08.12.2013 at 12:00 am / Alien Blue Entrances
  10. 16.03.2012 at 12:00 am / Sentient Vocal Directives
© Wan Zafran. See disclaimer.