logo       
Google Custom Search
    AddThis Social Bookmark Button
-->

Re: Metaprogramable expressions?: msg#00007

Subject: Re: Metaprogramable expressions?
On Thu, Jan 06, 2005 at 01:37:43PM -0700, Miller, Brian wrote:
> Of the many XML dialects for processing (o:XML, dSVG, XSLT, Ant,
> WS-BPEL, etc), only JavaML decomposes an expression into XML elements.
> This makes JavaML almost unreadable, and indeed JavaML is a dead
> language.  

I wouldn't quite say dead. As I'm working on SrcML (similar to JavaML)
we just recently had a request from a company working with JavaML.
Also there are some XML based programming languages out there which
also decompose expressions.

> But I wonder, have these other XML dialects lost some
> significant opportunity for further metaprogramming because they don't
> have structured expressions?

Obviously not. If you have an expression of the kind 'a = b+c' and
store it at an abstract level with something like
'<expr>a=b+c</expr>' in the extreme case, then this does not change
the amount of information contained in the document. So you can choose
just how far into the details you want to decompose the source code
and still you neither gain nor lose any additional information, as it's
still the same code. So you're not theoretically missing out anything,
just that in practice you might either have it easier for not having
to parse something into more detail or you might have it harder through
added complexity when too much was decomposed for your needs.

As for the advantages and disadvantages views - and therefore available
XML formats - differ. For example the srcML project is approaching this 
problem by supporting various levels of details in the parsing, so you 
can choose to decompose the source just as much as you want to. Of 
course you then have to take care when handling already parsed XML data,
as two files might have been parsed at different detail levels.

And you're speaking of 'unreadable' which I personally consider an
irrelevant point. As I already pointed out in an earlier mail I believe
that source code representation in XML should stay in the background.
XML is great for tools to work with the code, but as a programmer I
prefer having something more readable than XML and so I don't care about
the complexity of the underlying format as long as my editor shows me
the code in the way I want it to. This also applies to your argumentation
insofar as a document with high decomposition could also be viewed through
an editor with a certain threshold level being set. This would essentially
mean that everything below that threshold level (say below expression 
level) will be rendered as plain source code again. (This is something
SrcML is capable of doing through its ViewPlatform easily, just in case
you are interested in writing such an editor :)

With kind regards,
-- 
Raiser, Frank
Student @ University of Ulm (www.uni-ulm.de)

Then anyone who leaves behind him a written manual, and likewise anyone who
receives it, in the belief that such writing will be clear and certain,
must be exceedingly simple-minded. (Plato)


<Prev in Thread] Current Thread [Next in Thread>