Olin Lathrop wrote: > Gerhard Fiedler wrote: >>> First, I think you are asking about subroutines in general, not just >>> functions. Note that calling all subroutines "functions" is a C-ism. >>> Since we are talking computer science in general, you shouldn't say >>> "function" unless you specifically mean a subroutine that returns a >>> value. >> >> Could it be that making this distinction between subroutines and >> functions is a Pascal-ism -- and not that not making it is a C-ism? :) > > The distinction is common to many languages. So what? That doesn't make it more basic than not distinguishing them -- there are also many languages that don't. So far, you've only cited a few languages that make a similar distinction. This is a /very/ long shot from "computer science in general". > Fortran, the first compiled language, used the name "subroutine" and > "function". Pascal uses "procedure" and "function". C came after both > these. In C all subroutines sortof are functions, just that some of > them return "void". Assembly came before all of these, and in assembly, a function call and a subroutine call are the same. We could shoot examples back and forth all night long, but the fact remains that you claimed that this distinction is somehow something fundamental in computing science, and so far you only showed that some languages do make it. I don't know whether you know or not (your post seems to imply you don't, but I think you're just faking that you don't know when actually you do know, just that this knowledge doesn't suit your point :), but there are also languages that don't, which makes citing examples a rather moot point, as there are many on both sides of the fence. There doesn't seem to be a general principle at play; it's a mere matter of syntax that some languages make this distinction and others don't. > What's wrong is going back to the general computing world outside C and > calling all subroutines functions. Now why would this be wrong (other than because you don't like it)? It simply depends whether this distinction adds anything to the (general, that is, non-C and non-Pascal) discussion. In the scope of our discussion, this distinction has no meaning at all, so why put on my Pascal hat and make a distinction, where there is no need? > Unfortunately a lot of people can't seem to separate C specifics from > general computing. That is definitely bad. And some people seem to have a need to inject their favorite's language's features in every general discussion, be they relevant or not :) Gerhard -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist