On Monday, 16 October 2017 at 05:20:16 UTC, Dmitry Olshansky
wrote:
On Sunday, 15 October 2017 at 20:24:02 UTC, Adam Wilson wrote:
database access (MySQL, PostgreSQL, Aerospike) libraries are
available,
That is important actually.
So important that it should be a Priority 0 Must Have.
Luckily it should also be quite strightforward to write them.
At minimum there would be a C, Go, Java and Python “driver” to
look at.
Also surprisingly, D has superior driver for MySQL that talks
native binary protocol while most other languages use the text
mode.
preferably as a standard library (like in Dart and Go).
Can’t do that. And it’s not standard in Go and Dart but
packages, dub
should work for that.
I've been thinking about this question a LOT, and I'm not
convinced it's impossible to put the DB libs into the standard
Problem is - the development of std has glacial pace. Even if
you put say Aerospike in std, I don’t think it’s in our best
interest to have stagnated DB libs. DBs add features and ship
new versions all the time.
What might work is JDBC style approach - having a common
interface in std with implementations in 3rd party. SQL might
work this way.
NoSQL though is highly irregular and benefits primarily from
features unique to a particular vendor.
This is the best answer I've even been given on the main drawback
of a standard library component.
Then I suggest that some script is used which "standardizes" the
module component of a thirdparty library to make it belong to the
"std" namespace, and put the result in the DMD/GDC/LDC
installation packages.
Best of both worlds...