Proposal: Database Engine for D

Russel Winder via Digitalmars-d digitalmars-d at puremagic.com
Sat Jan 9 02:49:25 PST 2016


On Thu, 2016-01-07 at 15:32 -0500, Andrei Alexandrescu via Digitalmars-
d wrote:
> On 01/07/2016 02:02 PM, Russel Winder via Digitalmars-d wrote:
[…]
> 
> Got it, thanks. I took a look at a familiar topic - json grammars.
> 
> I just googled `boost spirit json` and followed through the top
> result. 
> For C++, the grammar definition would be 
> https://github.com/cierelabs/json_spirit/blob/master/ciere/json/parse
> r/grammar_def.hpp.
> 
> Then I googled `pegged json` and the top result led to 
> https://github.com/PhilippeSigaud/Pegged/blob/master/pegged/examples/
> json.d.
> 
> Which do you like more?

Just a quick look I'm afraid, so very superficial at this stage:

The D code as presented is clearly simpler and easy to read. However
the D grammar is a string and not code so the anticipation is that
errors in the C++ code would be easier to find and correct. I guess the
question here is how good the compile time evaluation of strings is in
D and does it do good error reporting.

I still prefer the concept of Internal DSL explicitly in the code
rather than in strings just now, but this may still just be prejudice.

-- 
Russel.
=============================================================================
Dr Russel Winder      t: +44 20 7585 2200   voip: sip:russel.winder at ekiga.net
41 Buckmaster Road    m: +44 7770 465 077   xmpp: russel at winder.org.uk
London SW11 1EN, UK   w: www.russel.org.uk  skype: russel_winder

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: This is a digitally signed message part
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20160109/40c495ce/attachment.sig>


More information about the Digitalmars-d mailing list