ID:1503896
 
(See the best response by LordAndrew.)
I've never seen this proc until today. I'm here to ask whether or not this is to be used. Similarly how goto should not be used, would ASSERT() be an issue to be used as well? Or should we be using a different approach?
Best response
ASSERT() is a macro used for debugging. If the expression you pass it is false, then it will immediately cease the function it was called in and generate a runtime error. It's just a sanity check, and it's entirely fine to use (though most developers don't, for whatever reason).

mob/verb/Assert()
var i = 5

ASSERT(i == 5)

var j = 6

// runtime error: assert.dme:17:Assertion Failed: j == 3
ASSERT(j == 3)

Internally ASSERT() is defined in stddef.dm as:

#define ASSERT(c) if(!(c)) {CRASH("[__FILE__]:[__LINE__]:Assertion Failed: [#c]"); }
So, pretty much there most likely wouldn't be anything wrong with this that would cause weird errors?

Sorry if I'm being too broad with my questions. I'm just helping someone with programming and he is using ASSERT(). Trying to get rid of some bugs for him since there's been some crashing.
In response to Xirre
ASSERT() shouldn't be causing any issues, unless he's doing something really weird with it. It's pretty much just an if statement that calls CRASH() if what you're asserting isn't true.
Okay, I'll look more deep in to it then, while also keeping in mind what <code>ASSERT()</code> does actually.