> > Ted Roche wrote: > > On Wed, Aug 12, 2009 at 6:36 PM, Gene Wirchenko<[email protected]> > wrote: > > > > > >> At 08:38 2009-08-11, Alan Bourke <[email protected]> wrote: > >> > >>> Mea culpa, but not language as in 'programming language'! > >>> > > > > > >> How would you differentiate the two? > >> > >> Fair warning: I am taking a course in the theory of > computation. > >> > >> > > > > Well, then, you really ought to know already, shouldn't you? :) > > > > I'd take a swipe at it: a markup language (XML, HTML) is a syntax and > > grammar for describing the metadata that dictates the structure and > > representation of data. optionally contained in a document. In > > contrast, a programming language provides instructions for an > > interpreter/compiler to execute against said data. > > > Or maybe : a markup describes a desired result whereas a programming > language describes a series of actions (though that would put SQL into > the markup camp).
The issue is the number of layers of separation from the physical computational paradigm of the machine to the logical constructs of the human-readable language. Some languages are low-level, and operate more or less along the same logical paradigm as the machine's physical structure---that is, they are stack based, with registers, a heap, etc., all of which you have explicit access to in terms of language constructs. C/C++ are in this category, as well as most native-compiling imperative languages (Delphi, D, Ada, etc). You feed logical instructions to the computer according to a dialect of the computer's physical memory model, one at a time, each one having a fairly direct translation to the underlying assembly -- which is itself a "language" describing with one-for-one mnemonics what is to happen in the machine. The concept of the data being separate from the instructions at this level is pedantic to the point of irrelevance: Instructions always operate on, or with, or in relation to real data, located somewhere in memory. Higher level languages tend to me more declarative and functional, trusting the compiler (or interpreter) to handle the lower level mapping of language concepts to computer instructions. Higher level languages, especially pure functional languages like Haskell, actually put less focus on both the data and the instructions and more focus on the logic. It's the mid-level, OO languages that actually are data-vs.-instructions-obsessed. XML could be considered a language, if a compiler translates (or even interprets) the "code" to actions executed in the computer. Eg, XSLT, which actually has a limited but Turing-complete number of control primitives, does indeed "execute" a transformation from an XML source to something else (another XML file, a PDF, an HTML file, etc.). Or it might just be a generic markup describing data. I've used it for code generation, i.e., metaprogramming, a lot on several different programming platforms. I tend to think of it as a meta-language when obvious comparisons to cholesterol or snake oil aren't foremost in my mind. :) XML has been in search of what it really is since it's "discovery". ;) - Bob _______________________________________________ Post Messages to: [email protected] Subscription Maintenance: http://leafe.com/mailman/listinfo/profox OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech Searchable Archive: http://leafe.com/archives/search/profox This message: http://leafe.com/archives/byMID/profox/[email protected] ** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.

