DEV Community

Discussion on: I'm Sandi Metz, Ask Me Anything! [Finished]

Collapse
 
peter profile image
Peter Kim Frank

Hi Sandi, thanks for doing this AMA!

What are your thoughts on functional programming?

Collapse
 
sandimetz profile image
Sandi Metz

I only have a small bit of experience with functional languages, so I don't get to have much of an opinion. I can say, however, that immutability and no side-effects are great ideas, and that I've borrowed them for my OO.

My initial goal for every new object I write is that it not change, and that it not have side effects. This obviously can't suit every object, but I've been pleasantly surprised about how much can be done under these constraints, and how much the constraints simplify code.