On Thursday, 22 December 2011 at 23:30:06 UTC, Johannes Pfau
wrote:
Vladimir Panteleev wrote:
On Thursday, 22 December 2011 at 23:12:07 UTC, Johannes Pfau
wrote:
There's one special thing about this module: It uses the ragel
(http://www.complang.org/ragel/) state machine compiler. I
hope
this is not a problem for phobos, ragel doesn't introduce any
runtime dependencies and has no effect on licensing. There's
also no need to integrate ragel in the build process. We can
publish a pregenerated .d file, which should be updated
manually whenever changes to uuid.rl are made.
Would it be hard to reimplement the ragel part using string
mixins? From a quick glance at it, it doesn't seem too
difficult.
It wouldn't be too difficult. Ragel is only used to parse the
text form of uuids. As that's a pretty simple task, such a
parser could be written manually.
But I also have a almost complete HTTP header parser/formatter
implementation using ragel which I wanted to propose for phobos
eventually. And I'm not going to rewrite those, so I hoped
std.uuid could clear the way for ragel based code in phobos ;-)
Using 3rd-party technology such as source preprocessors makes
future contributions more difficult for the vast majority.
Considering that the language provides nearly the same thing as a
fully-supported feature, it seems like a redundant complication.
Parsing/formatting HTTP headers isn't exactly rocket-science,
either.