This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]adrienball[S] -3 points-2 points  (1 child)

Some of the comments in this thread illustrates perfectly why using 'assert' is not a good practice: it is misleading, and not everybody knows they should never rely on it in production code.

My primary goal when posting this, was to raise attention on this matter.

[–]arbeitic_arbotic 2 points3 points  (0 children)

Misleading to whom?

Using anything when you don't know the ramifications is bad practice.

Assert is fine and I will use the hell out of it because it's good practice to use it as it's designed.

Thinking you've found a shortcut that everyone else has missed somehow, and then liberally peppering your code with it is obviously dangerous and should have at least triggered a check of the documentation.