Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Simple made easy

Name: Anonymous 2011-10-21 10:06

http://www.infoq.com/presentations/Simple-Made-Easy

Rich Hickey's presentation which received a standing ovation from Dr. Sussman.

Name: Anonymous 2011-10-21 18:36

>>19
Holy shit, I clicked the link a second time and somehow it was worse than the first.

Ok, let me try this again...  I have an array of pairs of strings.  Say they represent (first_name, last_name).  I want to be able to sort the list by either first_name or last_name.  In C, I'd probably use a simple data structure that's an array of structs, where each struct contains two char * pointers.  To sort them, I walk through the array in whatever fashion my particular sort algorithm requires and I swap structs here and there until my algorithm says that they're all sorted.

In doing this, I've definitely changed a lot of "state" because I've moved those structs around and overwritten memory contents.  What's so bad about that, and how does functional programming do better?

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List