Modern C++ Lamentations
Rubn
where at is.this
Sat Dec 29 13:04:49 UTC 2018
> Issues with “Everything is a library” C++
That kind of mentality sounds familiar, can't put my finger on it
though.
Probably won't get anything as nice as what C# does:
var triples =
from z in Enumerable.Range(1, int.MaxValue)
from x in Enumerable.Range(1, z)
from y in Enumerable.Range(x, z)
where x*x+y*y==z*z
select (x:x, y:y, z:z);
foreach (var t in triples.Take(100))
{
Console.WriteLine($"({t.x},{t.y},{t.z})");
}
At least not creating an "object" that represents a triple in
that sense that is readable and doesn't involve mixins.
More information about the Digitalmars-d
mailing list