Hacker News new | past | comments | ask | show | jobs | submit login

The annoying aspect of this is that you can end up with a deep call stack. For example, on macOS:

      * frame #0: 0x00007ff818dd6fce libsystem_kernel.dylib`__pthread_kill + 10
        frame #1: 0x00007ff818e0d1ff libsystem_pthread.dylib`pthread_kill + 263
        frame #2: 0x00007ff818d1b2c8 libsystem_c.dylib`raise + 26
        frame #3: 0x0000000100003f6e sigtrap`main + 14
        frame #4: 0x000000010001552e dyld`start + 462
(I vaguely remember it being similar on Linux.)

Regular POSIX programmers might scoff at the very idea that this is an issue, but I always found it rather tedious having to piss about just to get back to the actual place where the break occurred so that you can inspect the state. The whole point of an assert is that you don't expect the condition to happen, so the last thing I want is to make things any more fiddly than necessary when it all goes wrong.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

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

Search: