RFC: Change what assert does on error

H. S. Teoh hsteoh at qfbox.info
Tue Jul 1 21:39:04 UTC 2025


On Tue, Jul 01, 2025 at 07:18:42PM +0000, Kagamin via Digitalmars-d wrote:
> On Sunday, 29 June 2025 at 20:58:36 UTC, Richard (Rikki) Andrew Cattermole
> wrote:
> > 4. assert is a framework level error mechanism, not "this process can't
> > continue if its false". We'll need something else for the latter, it can
> > be library code however.
> 
> ```
> landmine(a.length!=0);
> ```
> Not sure how long should be the name.

Just learn from Perl:

	# Perl
	die if ($a != 0);

	# Proposed D
	die(a.length != 0);

;-)


T

-- 
I tried to make a belt out of herbs, but it was just a waist of thyme.


More information about the Digitalmars-d mailing list