|
|
|
|
|
by dwattttt
422 days ago
|
|
Well, as a human compiler, I said "Hey, you've non-NUL terminated a NUL terminated string". If that was what you intended you should use the type annotation for that, so I think that case worked as intended. EDIT:
> what do you think should happen if you store a NUL when you're claiming you're not I don't believe nonstring implies it doesn't end with a NUL, just that it isn't required to. |
|
Note that "works as intended" isn't sole the criterion for "does it make sense" or "should we do this." You can kill a fly with a cannon too, and it achieves the intended outcome, but that doesn't mean you should.