From: Robert Klemme Date: 2009-01-31T19:00:04+09:00 Subject: Re: proper use of classes On 31.01.2009 10:02, Tom Cloyd wrote: > BTW, I was puzzled for years by the mathematical notion of a function. > It just eluded me. Baffled me. Then, as I was learning to program in > Fortran, years ago, I began to wonder if there was any relation between > Fortran functions (hope you know a little Fortran) and mathematical > functions. Of course, there is. Fortran functions was no problem at all > to grasp, and once I realized they were just another way of expressing a > mathematical function (or perhaps I should say that a math function can > be expressed as a Fortran function, and in fact that was what they were > for), I was seriously rageful. IMHO there is an important distinction though which makes Fortran functions a bad example: mathematical functions usually do not have side effects, i.e. they can be completely described in terms of input and output. I view them as a relationship (or call it a mapping) which assigns particular output values to particular input values. If I'm not mistaken, a Fortran function can have side effects on arguments (and probably global variables). A closer analogy are functions in - you guessed it - functional languages. Kind regards robert