|Perl: the Markov chain saw|
Re^9: Plack Middleware aXMLby Logicus
|on Oct 20, 2011 at 22:22 UTC||Need Help??|
not a fair comparison..
It's difficult to find a fair comparison when we are talking about such different paradigms. I'm not trying to replace Perl's syntax, so much as wrap it in a container which makes it easier and quicker to assemble batches of complex imperative statements using a simple declarative syntax.
Sometimes there is little difference, and sometimes you do get several orders of magnitude advantage. For instance on the old system there was a plugin called aJAXchat (I haven't got round to porting it to the new one yet), which allows for any page of any project to instantly include an ajax powered chatroom by simply adding this :
The more abstract you get with the tags and their meanings the greater the advantage you gain. Some of the plugins are hundreds of lines of code, and can be accessed, and layered with the other plugins to create even greater complexity. I.E ;
Now suddenly the chat room only appears if the debug flag is set... why you would want to do that is beyond me, but the principle is sound.
Your right when you say that someone would have to write the Perl code anyway to give the tags their meanings, but once written that tag then becomes a reusable package which as I mentioned can be used in concert with all the other packages. Write once, use many.
>>syntax checking or highlighting, debugging, testing.
When your confident, as I am, that the lower level of the system is bug free (especially the older version), then you find that the only place bugs exist is at the document level, and nearly always its because you've left out the / from the end tag or something silly like that. The very nature of the syntax and the way it reuses batches of pre-written and well tested code lends itself to coding with very few bugs. With that in mind, consider then that a lot of the testing and debugging tools needed for the full blown complexity of Perl are just not needed to check if an aXML document has the correct syntax.
As for saying Perl has advantage over aXML due to maturity, that's still thinking of aXML as being some sort of rival or equal to perl, it isn't, it's just an abstraction layer which implements a higher order and makes for quick and easy construction of statements which require a lot less brain power to build and debug than the Perl code which powers it.
security hole... yeh I remembered that when I was typing it but I was just like bleh, its only a silly little incomplete example anyway.