D enters Tiobe top 20
Ola Fosheim Grøstad
ola.fosheim.grostad at gmail.com
Tue Nov 12 07:43:16 UTC 2019
On Tuesday, 12 November 2019 at 04:25:57 UTC, Doc Andrew wrote:
> so pre-conditions, as far as I can tell. This might be where
> Walter is coming from in saying that Asserts and Assumes would
> be the same in D. This is the only example I could find that
> uses "assume" like this, but there may be others.
He meant that asserts are turned into assumes as an optimization.
He has explained his position before in an older thread. It kinda
might work in some settings if you can limit the assumed facts to
a single function, but that is not how LLVM works. So it could
work in dmd, but a bit dangerous. It would be a disaster in the
two other D compilers.
Microsoft c++ uses __assume for giving facts to the optimizer. D
should stick with that,
More information about the Digitalmars-d