Asking for code review - contract programming
Mark
smarksc at gmail.com
Mon Jan 24 12:41:40 UTC 2022
On Tuesday, 11 January 2022 at 17:40:48 UTC, Ali Cehreli wrote:
> The following invariant check might be a 'static assert':
>
>
> https://github.com/Fr3nchK1ss/SnakeD/blob/master/source/ground.d#L26
>
> (invariant has runtime cost.)
>
> Ali
Does the compiler not rewrite `assert`s into `static assert`s if
there is no dependence on runtime values? Maybe this is a
worthwhile optimization to implement.
More information about the Digitalmars-d
mailing list