Software Development with Linux

About arguments and results

WED, 01 JUL 2009

Whatever programming language you use, you have to deal with arguments and results. There are many ways to pass arguments to methods, and also many ways a method can use to return its results.

Even if arguments and results are one of the most fundamental items of programming, it's often overlook when designing new software (or redesigning old ones).

James Noble wrote a nice paper title Arguments and Results, which discuss six (6) patterns about arguments passing and results in object oriented programs. It's really only two (2) patterns, one for arguments and one for results, plus two (2) specializations each (which surprisingly brings us to six!).

What I like about this paper is that, like all good patterns, it offer a clear and simple view of a solution we are often already using. But having the important idea distilled in a pattern allow us to realize what's really going on, and help us see when we can (or can't) use it.

I encourage every programmer and designer to read that paper.

Photo credit : mortimer?