On Sun, Jan 13, 2008 at 06:40:21PM -0800, Darren Duncan wrote: > I still have to work out the details of the new dialect, but here's > an example of how Muldis D code in the terse dialect could look; > compare this 'square' function with the other email: > > [ 'function', 'square', '', [ > [ 'inner_function', '', { > 'result_type' => 'UInt', > 'params' => { > 'topic' => 'Int', > }, > 'root_expr' => '', > 'exprs' => { > '' => [ 'sys_func', 'Int.power', { > 'radix' => [ 'param', 'topic' ], > 'exponent' => [ 'Int', 'perl_int', 2 ], > } ], > }, > } ], > ] ]
Uint function square (Int topic) { Int.power (topic, Int 2); } That's terse. Yours is not. So far as I can tell mine is pretty much equivalent. With a bit of perl optree parsing (and Devel::Declare) you could perl-host this as Uint function square (Int $topic) { Int->power($topic, Int 2); }; which isn't quite as elegant but is definitely parseable :) Food for thought, anyway. -- Matt S Trout Need help with your Catalyst or DBIx::Class project? Technical Director http://www.shadowcat.co.uk/catalyst/ Shadowcat Systems Ltd. Want a managed development or deployment platform? http://chainsawblues.vox.com/ http://www.shadowcat.co.uk/servers/ _______________________________________________ List: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class IRC: irc.perl.org#dbix-class SVN: http://dev.catalyst.perl.org/repos/bast/DBIx-Class/ Searchable Archive: http://www.grokbase.com/group/[EMAIL PROTECTED]