3 ms·
One thing I dislike about it at a glance is: author "Peter Parker" email="peter@example.org" active=true This is like XML attributes, which I've always fo
by arp242 8y ago
One thing I dislike about it at a glance is:
author "Peter Parker" email="peter@example.org" active=true
This is like XML attributes, which I've always found annoying to deal with in programs. It doesn't really map to any native data structure in most (all?) programming languages, so you need a special class/struct which supports it.
Simply using something that maps directly to a hash map/object/associative array would be much better, IMHO.
Other than that, it looks like an interesting project.
- transfire 8y agoActually it is even a superset of XML, from the docs... SDL documents are made up of Tags. A Tag contains * a name (if not present, the name "content" is used) * a namespace (optional) * 0 or more values (optional) * 0 or more attributes (optional) * 0 or more children (optional) So it's like an XML node, but the `0 or more values` means it has a list/array for a "body".
- Zardoz84 8y agoAt least on the case of DLang implementation, uses a DOM api to access to the values. https://github.com/Abscissa/SDLang-D/blob/master/HOWTO.md https://github.com/Abscissa/SDLang-D/blob/master/HOWTO.md