Skip to content

Instantly share code, notes, and snippets.

@bryanhunter
Created February 10, 2012 04:05
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save bryanhunter/1786462 to your computer and use it in GitHub Desktop.
Save bryanhunter/1786462 to your computer and use it in GitHub Desktop.
Joe Armstrong on reusability in software (OO-vs-functional)

I think the lack of reusability comes in object-oriented languages, not functional languages. Because the problem with object-oriented languages is they’ve got all this implicit environment that they carry around with them. You wanted a banana but what you got was a gorilla holding the banana and the entire jungle.

If you have referentially transparent code, if you have pure functions-- all the data comes in its input arguments and everything goes out and leaves no state behind-- it's incredibly reusable. You can just reuse it here, there, and everywhere.

-Joe Armstrong, Designer and implementer of the Erlang programming language

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment