Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> There's no semantic different between `assert` and `doAssert`.

There is a difference, but I agree that it's very subtle. In english do before a verb adds an emphasis so it's like "assert assert" or "really assert" put in a short easy to type form.



Any subtle difference you might be imagining is completely unrelated to the actual difference between them, and there's absolutely no way you could infer that difference.

They very clearly chose `doAssert` because they already had `assert` and couldn't think of a good name for a second similar-but-different kind of assert.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: