SDLang-D v0.8.1 - Initial release of SDL (Simple Declarative Language) for D

Nick Sabalausky SeeWebsiteToContactMe at semitwist.com
Thu Feb 28 00:02:24 PST 2013


SDLang-D is an SDL (Simple Declarative Language) library for D.

SDLang-D:
https://github.com/Abscissa/SDLang-D

Original SDL:
http://sdl.ikayzo.org/display/SDL/Language+Guide

SDL is similar to JSON or XML, except it's:
* Less verbose
* Type-aware

This is what SDL looks like (some of these examples, and more, are from
the SDL site):

    first "Joe"
    last "Coder"

    numbers 12 53 2 635
    names "Sally" "Frank N. Stein"
    pets chihuahua="small" dalmation="hyper" mastiff="big"

    mixed 34.7f "Tim" somedate=2010/08/14

    myNamespace:person name="Joe Coder" {
        age 36
    }

Differences from original Java implementation:

* API is completely redesigned for D.

* License is zlib/libpng, not LGPL. (No source from the Java or
  Ruby implementations was used or looked at.)

* Anonymous tags are named "" (ie, empty string) not "content". Not
  sure yet whether or not this will change in the future.

* Dates with unknown or invalid time zones use a special type
  indicating "unknown time zone" (DateTimeFracUnknownZone) instead of
  assuming GMT.

Still TODO (in no order):

* Major improvements to API for Tags.

* Ability to write SDL output, not just read it.

* Make sure that all forms of newlines are handled correctly.
  (Unix-style '\n' definitely works right. Not certian about Win-style
  '\r\n', Mac9-style '\r' or special Unicode newlines.)

* Make this a DUB package.

* Improve docs.

More information about the SDL language itself is here:
http://sdl.ikayzo.org/display/SDL/Language+Guide

D implementation's homepage and readme:
https://github.com/Abscissa/SDLang-D

API reference:
http://semitwist.com/sdlang-d-api



More information about the Digitalmars-d-announce mailing list