October 05
I'm currently working through the dmd (and phobos for that matter), and come across it's regex implementation. Here I found out it makes rather heavy usage of malloc / pureMalloc; on one side to allocate the Matcher implementation inside `GenericFactory`; on the other side in `BacktrackingMatcher` for memory of it's stack.

Is there any historic reason why it dosnt uses more D-like features like `new` or dynamic arrays? It would certainly be safer to do so than using an untyped region of memory as stack-space.

Also: if it needs "plain" memory; would this code be a good candidate to utilize `std.experimental.allocator` once released?

phobos mailing list