John Hough wrote:
>  But for my specific problem OOP is the way to go I think.

Raul wrote:
>  Out of curiosity, why?

John responded:
>  Well, maybe I don't. But 
>  I have half a dozen variables I want to tie together.

Fair enough, but this just pushes the question back, a bit. Ultimately, J
programs manage state, as all non-pure-functional languages do (and,
arguably, as pure functional languages do, whether or not they admit it).

But J does hew closer to the functional paradigm than Java or C++, and
correspondingly puts less emphasis on managing state, and consequently,
typically J programs manage fewer unique variables than the equivalent
program in Java or C++.

Add on top of that that J encourages collecting all variables which change
together into a single array, and you sometimes end up with very
low-variable programs indeed.

I can't say that this must be the case for your current application, of
course; I can only observe that, as I studied and used J, my style evolved
towards using fewer and fewer variables, and placed more emphasis on data
transformation through the composition of stateless functions.  

Not to say "use fewer variables" is better in some generic, universal
sense, only that it is probably "J-er". But, then, as Raul is so often and
so rightly points out, all design choices are necessarily compromises.

-Dan


----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to