I am enjoying the puppet declarative model. I'd like to try to incorporate more of this into my code.
I program in python currently, however, and I tend to think imperatively while doing so. It's just like my problem with graphic design: I know what I like to see in an end product, but have no idea how to assemble it.
How can I structure things so that the code would be declarative? What initial steps are taken if the solution is to be recognizably "declarative?"
Functional, Declarative, and Imperative Programming I've just read this, bringing insight, a bit.
Not enough though, can't put it into words exactly, my confusion :(
EDIT: Words have come: The examples given for declaration always are given in terms of some other high level thing:
Regexen are declarative, sure, but you make the engine out of C.
Make is declarative,certainly but it's written in C.
Puppet mainifests are declarative of course, but the Ruby code is not.
So at what point do I say: "Ok, here is the methods, now I can begin the declarative part" ?