October 05, 2023 [phobos] Historic background of std.regex and BacktrackingMatcher | ||||
---|---|---|---|---|
| ||||
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?
Cheers,
Mai
_______________________________________________
phobos mailing list
phobos@puremagic.com
http://lists.puremagic.com/mailman/listinfo/phobos
|
Copyright © 1999-2021 by the D Language Foundation