On 2015-02-06 10:50 AM, Tim Bunce wrote on dbi-users:
On Thu, Feb 05, 2015 at 12:23:40AM -0000, Greg Sabino Mullane wrote:
As you may have heard, Larry Wall gave a speech recently declaring
the goal of releasing Perl 6 this year, 2015. Honestly, there
is little chance of me using Perl 6 until it has a good, working
DBI. Anyone know the state of things with DBI and Perl6? Is the
goal still to implement what is basically DBI v2, or perhaps
someone is working on a simple port of the existing DBI? Is
a working DBI even on their list of blocker features for a release?
On MoarVM the perl5 DBI can be accessed via the Inline::Perl5 module.
That probably counts as a "reasonable working DBI" :)
Back in 2007 I said this:
http://www.slideshare.net/Tim.Bunce/dbi-for-parrot-and-perl-6-lightning-talk-2007
Then in 2010 I said this:
http://www.slideshare.net/Tim.Bunce/perl6-dbdi-yapceu-201008
I still think that's the right way to go, for all the reasons expressed
in the slides.
I support this in principle, particularly the part about having a
language-agnostic DBI that can be reused across multiple languages otherwise
capable of running in the same VM.
However, I still think there should be no mandatory sharing of code between
different DBMS interfaces, for example one shouldn't be required to share any
code between say a PostgreSQL interface and a MySQL interface.
What we should have instead is documented API standards, and a shared test suite
written to that API that each DBMS interface implements, and that this common
API is what we call "DBI".
For example with a minimal delta from how it works now in Perl 5, we go from
this:
$dbh = DBI->connect('dbi:pg:foo', ...);
... to this:
$dbh = DBD::Pg->connect('foo', ...);
... and the $dbh etc essentially behaves the same, but now DBI is just an
interface that DBD::Pg etc provides to the public rather than a mandatory extra
piece of mediating code.
What's missing is a team of people with the right skill willing to work
on it. I've had little time to do more than the tinkering I've already
done and I'm severely hampered by knowing ~zero perl6 or Java.
Volunteers are most welcome to express interest on the dbi-dev mailing list.
Tim.
I am certainly interested in this, and so am expressing so on dbi-dev.
That being said, for the moment I am working to tackle the problem from a
different angle, which loosely resembles your proposal but is distinct. I hope
to have the start of something executable in about 2 months that people can play
with. (It will actually be in Perl 5 initially, but a Not Quite Perl port would
follow.) Then we could either use that as a point of departure, or otherwise it
could just help inform your proposal.
-- Darren Duncan