@system blocks and safer @trusted (ST) functions
Araq
rumpf_a at web.de
Mon Jul 26 06:54:06 UTC 2021
On Monday, 26 July 2021 at 00:50:17 UTC, jfondren wrote:
> (But Nim disappoints here: if you change favoriteNumber to
> return an int, and then change the number to 142, then Nim
> doesn't complain at all about this code that assigns an int to
> a Index variable.)
Well, it still checks the indexing at runtime, just like Ada,
Rust, C#, D, etc. One can do better than this and check it at
compile-time but then you would complain about the annotation
effort and implementation complexity so it would never stop to
"disappoint"...
More information about the Digitalmars-d
mailing list