Re: Destructors can't be @nogc?

2021-07-24 Thread Guillaume via Digitalmars-d-learn
On Saturday, 24 July 2021 at 02:48:51 UTC, Paul Backus wrote: Which raises the question, *why* is `destroy` not `@nogc` when the destructor is `@nogc`? And it turns out the answer is that [it calls `rt_finalize`][1], which [takes its argument as a `void*`][2] and therefore has to assume that

Re: Degenerate Regex Case

2015-04-26 Thread Guillaume via Digitalmars-d-learn
On Saturday, 25 April 2015 at 09:30:55 UTC, Dmitry Olshansky wrote: A quick investigation shows that it gets stuck at the end of pattern compilation stage. The problem is that as a last pass D's regex goes to optimize the pattern to construct simple bit-scanning engine as approximation for

Degenerate Regex Case

2015-04-24 Thread Guillaume via Digitalmars-d-learn
Hello, I'm trying to make a regex comparison with D, based off of this article: https://swtch.com/~rsc/regexp/regexp1.html I've written my code like so: import std.stdio, std.regex; void main(string argv[]) { string m = argv[1]; auto p =