4 ms·
I can't say that I like this very much. Problematic macro in the header, custom string type compatible with nothing else in C, and I have no idea where the are
by lelanthran 2y ago
I can't say that I like this very much.
Problematic macro in the header, custom string type compatible with nothing else in C, and I have no idea where the arena type comes from.
Having it magically deallocate memory is nice, but will confuse C programmers reading the caller.
Honestly, adding -lre to the linker is just much easier, and that library comes with docs too.
- Brian_K_White 2y agoTFA links to what arenas are and where they come from, how some bits included here would not really be part of this library but assumed part of the project using these techniques, does explain the general point of the exercise, and how this isn't even strictly a suggestion for a library but a "potpouri of techniques". They are fully aware of -lre and assume that everyone else is too. This isn't about just achieving regex somehow. It's about avoiding the crt and gc and c++ in general while using an environment that normally includes all that by default. You don't redefine new just to get regex. Obviously there must be some larger point and this regex is just some zoomed-in detail example of existing and operating within that larger point.
- D4ckard 2y agoRead his other stuff, it’s rather well thought out. The assumption is you don’t use libc or at least you use different interfaces to it.