[TYPES] Declarative vs imperative
Uday S Reddy
u.s.reddy at cs.bham.ac.uk
Mon Apr 22 19:38:56 EDT 2013
Mark Janssen writes:
> > But one man's specification is another man's algorithm.
> >[...]
> > Similarly, a C program is a specification for a hundred different
> > machine code algorithms that manage memory, register allocation etc.
>
> ...
> A C program is not a specification in any sense (if it's even
> appropriate to call C source text a "program", prior to compilation
> into an executable). Only the theorist who has never gotten "close to
> the machine" could ever say that. <other ranting elided>
Nikhil's point was the a C program is a "specification" in the sense that it
has details left out which are filled in by the compiler and the run-time
system automatically. He is pointing out the *relativity* of the notions of
specification and implementation.
May I also point out that this message of your was way too patronizing?
Please take it for granted that we are all computer scientists here. We
have all written assembly language programs, perhaps small compilers and
fragments of operating systems as part of our education. So, we don't need
to be lectured on those topics.
However, almost all of us on this list would agree that a compiler does not
constitute the "meaning" of a programming language. Rather, the compiler is
an implementation tool that must preserve the meaning of programs, with a
notion of "meaning" that is independently defined.
Cheers,
Uday
--
Prof. Uday Reddy Tel: +44 121 414 2740
Professor of Computer Science Fax: +44 121 414 4281
School of Computer Science
University of Birmingham Email: U.S.Reddy at cs.bham.ac.uk
Edgbaston
Birmingham B15 2TT Web: http://www.cs.bham.ac.uk/~udr
More information about the Types-list
mailing list