Re: Python gets macros - now XML does too
From: Manuel Lemos (mlemos_at_acm.org)
Date: 01/12/05
- Next message: Cameron MacKinnon: "Re: Question for Cameron MacKinnon if he's around"
- Previous message: Rob Warnock: "Re: Smug scheme weenies?"
- In reply to: Frank Buss: "Re: Python gets macros - now XML does too"
- Next in thread: Adrian Kubala: "Re: Python gets macros - now XML does too"
- Reply: Adrian Kubala: "Re: Python gets macros - now XML does too"
- Reply: Kenny Tilton: "Re: Python gets macros - now XML does too"
- Reply: Frank Buss: "Re: Python gets macros - now XML does too"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Wed, 12 Jan 2005 02:37:50 -0200
Hello,
on 01/08/2005 10:57 PM Frank Buss said the following:
>>What is more interesting about the metaprogramming capabilities
>>provided by MetaL is not metaprogramming features of level 0 (macro
>>expansion) or even level 1 (generate code in other languages).
>>
>>The real power comes from level 2 metaprogramming features and
>>eventually beyhond. Level 2 means that you write a code specification
>>in an high level syntax. That that specification is translated into
>>MetaL level 1/level 0 XML source code, which gets translated to the
>>final target language of choice. Currently PHP, Java, and Perl are
>>supported but it could be also LISP.
>
> What you called level 2 metaprogramming is possible in Lisp, too. But as
> far as I understand, you have to implement the expansion code in PHP for
No, the whole MetaL engine is written in PHP. So all modules are written
in PHP. If I would have written the MetaL engine in Lisp or other
language, it would only be natural that its modules would be all in that
language.
> your MetaL system. First a high-level description in XML, then
> transforming it with a MetaL PHP module to a lower level XML description
> and then transforming it again to Java or PHP with another MetaL PHP
> module. This limits the things you can do or makes it too cumbersome. In
I can understand that you find it cumbersome because you only want to
program in Lisp but it is all in PHP. If it was all in Lisp, would you
still find it cumbersome?
> Lisp you use Lisp for transforming a macro to a lower level and the macro
> code itself can use macros to help writing the macros easier, or you
> could use the transformed macros for transforming other things (for
> example you could implement the MetaL system with Lisp macros, which then
> are used to translate XML to PHP, Lisp or Java).
>
> Sometimes it might be necessary to use PHP or Java, for example if the
> customer wants it, but your MetaL system shows, that PHP and Java are too
> limited to use it without any external preprocessor, if you don't want to
> write redundant code. This is ok, but in Lisp you write anything in Lisp;
> you don't need to switch between different programming languages or
> representations, and while writing your Lisp program, you enhance the
> language itself to remove any redundant code.
I think I was not clear that developed MetaL not to generate code in any
specific language but rather to not ever be tied to any language.
The reason is actually simple. As time goes, old languages tend to go
out of fashion because new types of applications become more proeminent
and for those newer languages become more appropriate.
Now I develop in PHP but in the future I may never use it. I do not have
a crystal ball but I would not be surprised if you no longer program in
Lisp in the future too. That is just natural.
This may be different where you live but where I live and in many places
there is no market for Lisp programmers. It seems to be an old language
that has gone out of fashion. Some how this chart confirms that feeling:
http://www.tiobe.com/tiobe_index/tekst.htm
This does not mean that Lisp or any similar languages do not have their
merits. It just means that if most of your work is tied to Lisp, in the
future you may not have a way to reuse your code libraries in jobs that
are based on other languages.
For many people, their opinions on their favorite languages will
eventually become irrelevant as they do not get to decide which language
to use in their work because it is who ever that pays for it that
decides. If you work for yourself or you are who gets to decide what to
use in your work, that is great for you, but I understand that most
programmers are not that lucky.
This may seem a dramatic view of the future for people that are so
attached to their language of choice and that language is becoming more
irrelevant to the world over the time.
I realized that is a natural trend when the company Commodore went out
of business in 1994 and that marked the end of the Amiga computers era,
which is what I used then and was so attached. There are still some
believers of the Amiga computers until today, but its market is
basically gone for quite some time.
Then all my code libraries that I wrote in C for the Amiga OS became
irrelevant. I could hardly reuse anything that could be reused for other
platforms as they were so dependent on Amiga OS features, despite C is
still a very proeminent language.
In 1997 I started developing Web applications but doing them in C is a
royal pain. Then PHP appeared a a glue language of many useful C
libraries and since its syntax was very much like C, I sticked to it
until today.
However, the ghost of the Commodore Amiga fate made me wonder until wehn
I would stick to PHP. Since I was sure that would not last forever, in
1999 I started working on MetaL.
Is MetaL the perfect solution? Of course not. Would it be better if it
was written in Lisp? Probably not. Could MetaL be used to generate Lisp
code? Of course yes, when somebody write Lisp bindings. Would it be
useful to generate Lisp? Very likely yes, but until I or somebody else
needs to develop Lisp and write its bindings I will not be sure of how
useful it may be.
-- 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: Cameron MacKinnon: "Re: Question for Cameron MacKinnon if he's around"
- Previous message: Rob Warnock: "Re: Smug scheme weenies?"
- In reply to: Frank Buss: "Re: Python gets macros - now XML does too"
- Next in thread: Adrian Kubala: "Re: Python gets macros - now XML does too"
- Reply: Adrian Kubala: "Re: Python gets macros - now XML does too"
- Reply: Kenny Tilton: "Re: Python gets macros - now XML does too"
- Reply: Frank Buss: "Re: Python gets macros - now XML does too"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|