Saturday, September 6, 2008

Amante thoughts

Back at the coffee shop, getting ready to go out tonight and having some tea and a gin n tonic.

This post is going to be quite idle, so tune out now if you have better things to do.

It occurred to me that what I really like about well-written software is its composability. The more composable a piece of software is the more options it gives people to do something cool with it.

I spoke with my father about building tools for the pathology lab and he had a superb insight. Please place this into context; my father and I are a lot alike but technical ability we don't share. He has the social ability that I lack and I have a higher order mathematical ability.

Anyway, he said that you want to make every tool as general as possible; this is what makes it useful. I didn't expect to hear that from someone who is not an engineer but it is one of the golden truths of computer science. Most likely it is the golden tool of anyone who builds and uses new tools in different ways; it then occurred to me that the diagnosis that he does probably involved quite a bit of problem solving. For some reason this never occurred to me.

This is the one primary advantage of functional programming if you are talking about the microscopic version of composability. It is also one primary advantage of open source software when are are talking about software development in the large.

I think we actually took quite a large step backwards in terms of software composability and reuse when we started compiling every down to binary. For some reason it seems that c,c++ based systems are inherently tougher to compose. Perhaps because malloc is a global, perhaps 1000 other reasons.

--context change--

It seems there is a lot of contention around garbage vs non-garbage-collected code. As far as monads and monadic forms are concerned, couldn't you consider the memory allocation system to be a monad? Isn't creating a new object implicitly changing state of the system in one way or another? Thus shouldn't every function that allocates new data use a monad passed in?

Granted this would be tedious but it would also allow you to use different memory management systems with different pieces of code.

Chris

No comments: