Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I'm a bit disappointed by some of the responses you received and that you were apparently downvoted.

Here's some text from Chapter 1 of the book that might make this clearer:

> Procedures, as introduced above, are much like ordinary mathematical functions. They specify a value that is determined by one or more parameters. But there is an important difference between mathematical functions and computer procedures. Procedures must be effective.

> As a case in point, consider the problem of computing square roots. We can define the square-root function as √x = the y such that y≥0 and y^2 = x .

> This describes a perfectly legitimate mathematical function. We could use it to recognize whether one number is the square root of another, or to derive facts about square roots in general. On the other hand, the definition does not describe a procedure. Indeed, it tells us almost nothing about how to actually find the square root of a given number. It will not help matters to rephrase this definition in pseudo-Lisp:

    (define (sqrt x)
      (the y (and (>= y 0)
        (= (square y) x))))
> This only begs the question.

> The contrast between function and procedure is a reflection of the general distinction between describing properties of things and describing how to do things, or, as it is sometimes referred to, the distinction between declarative knowledge and imperative knowledge. In mathematics we are usually concerned with declarative (what is) descriptions, whereas in computer science we are usually concerned with imperative (how to) descriptions.

[There's more after this, but it is off-topic for our purposes.] IMHO you're not wrong and you shouldn't've been downvoted. I think there's just an issue with semantic drift and evolving terminology and map-is-not-the-territory and so forth going on.



I appreciate it. The observation was really intended to be about the semantic drift, and the odd coincidence of language.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: