in reply to PlaydohPerl: our Perl 6 Programs in XML::Twig
OK, so despite the fact that it would open a huge market for XML::Twig ;--) here is why I think it is a bad idea:
What you are describing is essentially what Perl 6 aims at, except you want to do it at the wrong level. It makes more sense to have a neutral layer _under_ the language level. So Perl, Python, Ruby, or whatever your favorite language is, can be compiled into the same bytecode. You could get this bytecode and serialize it as XML, and there you are, you've got a Perl/Python/Ruby-independant represention of your code. Then you can go about doing whatever XML transformation you want. But this way you don't force your pet programming paradigm unto unsuspecting programmers, but rather you let them use their favorite language.
Leon Brocard said this at TPC: "we only write the compiler once but we use te language a lot". Hence it pays to put some complexity in the compiler to save us time when using it. Forcing people to type angle brackets in order to simplify the parsing of the language is false lazyness. $i++ might look harder to parse than <assign var="i" val="$i+1"/> (the funny thing being that it is actually just as hard to parse). Some people still won't talk to me after they had to use an SGML language I once wrote.
BTW, where do you stop? After an article about XML::Twig on XML.com I got an email that read like this:
twiggy your ::twig machine should have one method that takes one argument and + that argument should be an xml string. the twig machine can parse instructions from the argument and move fro +m there. the beauty of xml, xml schemas, xslt etc. is that they are essentially + xml. your function calls are nasty looking to me, but xml looks friendly. wouldn't it be "nice" to simply pass xml to your ::twig machine. there is a need for that type of engine; just lose the nasy syntax.
So really you should forget about that ugly looking XML::Twig stuff and use something like XSLT, which is really what the guy was looking for (and won't find in XML::Twig, nor in Perl!).
There is a reason why we are not all using the same computer language: (repeat after me) we are all individuals! . Let it stay that way: keep XML for the data and whatever programming language you fancy using for the code.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: PlaydohPerl: our Perl 6 Programs in XML::Twig
by abstracts (Hermit) on Aug 15, 2001 at 14:06 UTC |