assert() vs. enforce(), invariant() vs. ... ?

H. S. Teoh hsteoh at quickfur.ath.cx
Fri Aug 30 11:35:06 PDT 2013


On Fri, Aug 30, 2013 at 08:20:13PM +0200, Namespace wrote:
> >Typedef was useful not for poking around new type with same
> >properties - new name of existing type, but for non-trivial
> >default value:
> >
> >typedef int myint = 1;
> >
> >void main()
> >{
> >	myint my;
> >	assert(my is 1);
> >}
> >
> >Alias does not provide this feature, so D hadn't become better
> >with this depreciation (actually the opposite). Nor it had with
> >delete operator depreciation for the replacement of destroy, which
> >like in case with typedef, does not cover full old feature
> >functionality (and functionality what destroy() does provide is
> >useless in many cases). I consider both depreciations as mistakes.
> 
> Thanks for explanation. I agree that the deprecation of typedef and
> delete is/was a mistake, and IMO the deprecation of scope and the
> library fix scoped is the same mistake.

What, scope is deprecated now? When did this happen, and how come I
didn't hear about it?


T

-- 
Bare foot: (n.) A device for locating thumb tacks on the floor.


More information about the Digitalmars-d mailing list