Re: Python gets macros - now XML does too
From: Manuel Lemos (mlemos_at_acm.org)
Date: 01/04/05
- Next message: Guybrush Treepwood: "Infinity"
- Previous message: Gareth McCaughan: "Re: OT: Typography [was: CLisp case sensitivity]"
- Maybe in reply to: Manuel Lemos: "Re: Python gets macros - now XML does too"
- Next in thread: Adrian Kubala: "Re: Python gets macros - now XML does too"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Tue, 04 Jan 2005 20:27:25 -0200
Hello,
on 12/19/2004 11:45 PM Brian Downing said the following:
>>>These are a far cry from your translations into PHP and Java. I would
>>>have to say that the MetaL spec is not declarative enough. It pretty well
>>>specifies a contrived way (i.e. Java and PHP coding conventions) to
>>>implement the algorithm.
>>I am not sure what is your point.
>
> from your web site:
>
> MetaL is shorthand for Meta-programming Language.
> Meta-programming is a method to develop computer programs. It
> works by generating source code in a target language from a
> program specification in a higher level language.
>
> I think his point is that you have specified a rather Java/PHP-specific
> solution in your MetaL code for that example. There's no way you could
> go from your MetaL specification to Wade's code above, even though they
> do the same thing.
I see, but it seems you are viewing it from the wrong perspective. Let
me explain.
The point of MetaL is that from the same MetaL source code it can
generate equivalent code in different target languages, just like a C
compiler that can generate assembly code for different CPUs.
> If you had written your MetaL spec for this problem with higher-level
> abstractions, it is conceivable that your program specification could
> generate the rather idiomatic Lisp code above and simultaneously be able
> to output the lower-level Java and PHP code in your example. Instead
> you've encoded the lower-level stuff into your specification, which
> limits generating higher level code without a rather taxing analysis
> process.
>
> (It's possible that this example was simply rushed and not a typical
> sample of MetaL code.)
The MetaL compiler engine is modular. This means that I can add as many
modules as I want. There is no closed spec for the language because I
can add, remove, exchange any modules as it pleases me or whover feels
compeled to hack it.
That sample code that you have seen is just an example that uses
whatever modules were necessary to create a class for creating XML
documents (at runtime).
Currently there are about 30 modules but many more could be used for
implementing higher or lower level language constructs. It is just a
matter of need.
-- Regards, Manuel Lemos PHP Classes - Free ready to use OOP components written in PHP http://www.phpclasses.org/ PHP Reviews - Reviews of PHP books and other products http://www.phpclasses.org/reviews/ Metastorage - Data object relational mapping layer generator http://www.meta-language.net/metastorage.html
- Next message: Guybrush Treepwood: "Infinity"
- Previous message: Gareth McCaughan: "Re: OT: Typography [was: CLisp case sensitivity]"
- Maybe in reply to: Manuel Lemos: "Re: Python gets macros - now XML does too"
- Next in thread: Adrian Kubala: "Re: Python gets macros - now XML does too"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|