<div>ruz:</div><div><br></div>imho, the new syntax is easier to read. And it actually renders faster in runtime. Of course it's just shift some jobs to compile time like all those Devel::Declare based modules. Moose.<div>
<br></div><div>I've done a very simple benchmark program a few weeks ago:</div><div><br></div><div> <a href="http://gist.github.com/37042">http://gist.github.com/37042</a><br><div><br></div><div>By that time Markapl had only very limited features but the result of benchmarking shows that Markapl is somewhere about 200% faster then TD. I wish it'll still be that much faster when Markapl becomes almost as feature rich as TD.</div>
<div><br></div><div>However, I don't know what "problem" does it really solve for TD, actually. Maybe not, since TD is like super solid for a long time. It's more like a matter of preference. I prefer this syntax much more from the moment that I saw TD and I couldn't change it to the way I want until now that I've learn to play with Devel::Declare.</div>
<div> <br></div><div>As for the concern of maintability, by what I've got in the current work progress of integrating Markapl into TD, I'd say there're probably some decision to make to drop some backward compatibility at some point. Not now, nor it's coming soon, but having to support all sorts of syntaxes to assign attribute values make the code look horrible.</div>
<div><br><div class="gmail_quote">On Wed, Jan 7, 2009 at 6:56 PM, Ruslan Zakirov <span dir="ltr"><<a href="mailto:ruslan.zakirov@gmail.com">ruslan.zakirov@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
New syntax. I'm afraid such step could lower maintability. What the<br>
point? What will it give? Which problems it solves?<br>
<div><div></div><div class="Wj3C7c"><br>
On Sat, Dec 27, 2008 at 2:55 AM, Kang-min Liu <<a href="mailto:gugod@gugod.org">gugod@gugod.org</a>> wrote:<br>
> Hi, all<br>
><br>
> Recently I've been trying to use Devel::Declare to re-implement<br>
> Template::Declare for this very fancy syntax:<br>
><br>
> div(id => "salute") { "Hiya" }<br>
><br>
> And it worked very fine, big success. I'm very impressed by how much<br>
> it can be done with<br>
> Devel::Declare and B::Hook* modules. Kudos to rafl++<br>
><br>
> I released the implementation under the name "Markapl" (Mark up as<br>
> Perl) on CPAN few days ago.<br>
> The Markapl repository is on Github: <a href="http://github.com/gugod/markapl/tree/master" target="_blank">http://github.com/gugod/markapl/tree/master</a><br>
><br>
> And since obra requested, I'm currently integrating it into<br>
> Template::Declare. Several basic parts are<br>
> all ported, so statement like these are all working now:<br>
><br>
> div(id => "salute") { "Hiya" }<br>
> div("#salute") { "Hiya" }<br>
> div(".salute") { "Hiya" }<br>
> div("#salute.box") { "Hiya" }<br>
><br>
> And it's still backward compatible:<br>
><br>
> with(id => "salute"), div { "Hiya" }<br>
> div { attr { id => "salute"} outs "Hiya" }<br>
><br>
> The development is on "markapl-syntax" branch of Template-Declare<br>
> repository, the new code passes<br>
> about 60% of tests now. So please take a look, give me some thoughts<br>
> and may patches. It's all welcome. :)<br>
><br>
> btw, I've just done a tool Markpl::FromHTML (on CPAN now) that<br>
> currently convert<br>
> simple HTML to Markapl. This can be a pretty handy tool when working<br>
> with HTML-capable visual designers. :)<br>
><br>
> Cheers,<br>
> Kang-min Liu<br>
><br>
</div></div>> _______________________________________________<br>
> jifty-devel mailing list<br>
> <a href="mailto:jifty-devel@lists.jifty.org">jifty-devel@lists.jifty.org</a><br>
> <a href="http://lists.jifty.org/cgi-bin/mailman/listinfo/jifty-devel" target="_blank">http://lists.jifty.org/cgi-bin/mailman/listinfo/jifty-devel</a><br>
><br>
<font color="#888888"><br>
<br>
<br>
--<br>
Best regards, Ruslan.<br>
_______________________________________________<br>
jifty-devel mailing list<br>
<a href="mailto:jifty-devel@lists.jifty.org">jifty-devel@lists.jifty.org</a><br>
<a href="http://lists.jifty.org/cgi-bin/mailman/listinfo/jifty-devel" target="_blank">http://lists.jifty.org/cgi-bin/mailman/listinfo/jifty-devel</a><br>
</font></blockquote></div><br><br clear="all"><br>-- <br>Cheers,<br>Kang-min Liu<br>
</div></div>