25 ms·
"I can't try to rewrite it in C++ or Rust for now, due to the lack of generator support; the yield statement is what makes this code so nice and elegant, and al
by philipLutz 3y ago
"I can't try to rewrite it in C++ or Rust for now, due to the lack of generator support; the yield statement is what makes this code so nice and elegant, and alternative idioms are much less convenient."
- masklinn 3y agoThat is the context of the first sentence in your comment, pretty much the only part I left alone. Everything I replied to is the opinion you personally expressed. And note that the author had already preempted your comment in the first place: > When we want a list of all the primes below some known limit, gen_primes_upto is great, and performs fairly well. There are two issues with it, though: > We have to know what the limit is ahead of time; this isn't always possible or convenient.