[Dbix-class] fyi, official terse Muldis D dialect for daily work

Matt S Trout dbix-class at trout.me.uk
Wed Jan 16 07:18:39 GMT 2008


On Mon, Jan 14, 2008 at 01:53:13PM -0800, Darren Duncan wrote:
> At 7:49 AM +0000 1/14/08, Matt S Trout wrote:
> >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.
> 
> Now I suspect this is what you may be saying, but it would be 
> important to me that a tightly Perl-integrated solution like this 
> would work without the use of a source filter; any Muldis D code 
> written this way should be entirely parseable by the vanilla Perl 
> parser; make any adjustments to the above needed to do that.

Devel::Declare is not a source filter, it's a lexer extension.
 
> I suspect that perhaps :tags could be used for meta-data, or perhaps 
> what Moose does?

I dislike attributes.

> So I would be happy to see this sort of thing happen, but I currently 
> lack the Perl optree et al tuits to do it myself, though will help 
> anyone else to do it.

The (still somewhat vapourware) B::Simple project I and others are working
on aims to produce a developer-friendly optree abstraction to make just this
sort of thing possible - while DBIx::Perlish and ::StORM both prove you can
do perl -> SQL without an optree abstraction a quick look at the internals
of either demonstrates that the result is utterly impenetrable for anybody
uinfamiliar with the perl internals, which is why I haven't bothered trying
for DBIC yet (the author of ::StORM originally expressed the intention  to
help with it for DBIC but evidently he decided reinventing the wheel was
more fun ... sigh).

Once B::Simple starts to work I'm hoping Anton will help out and consider
porting Perlish - he certainly seemed open to the possibility last I spoke
to him. That should give us a nice start in terms of making other relational
things backend onto it.

-- 
      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/



More information about the DBIx-Class mailing list