≈ the.bay.news

How do you write asserts?

Ziggit
How do you write asserts?
HI, I started liking asserts to mark every clearly invalid state my function can happen to be run with. But at the same time, I feel like asserts give quite poor debug information - only stacktrace containing line with assertion is printed, which is ok, but forces me to give some descriptions as inline comments, and those can get long. So, do you also put some inline comments(I do that), or you modify panic handler and use custom assert that also takes comptime message, that is put into some s...

0 comments

Sign in to join the discussion — your thebay.events account works here.

No comments yet.