List of reserved words

Jonathan M Davis jmdavisProg at gmx.com
Thu Oct 11 10:56:46 PDT 2012


On Thursday, October 11, 2012 10:46:03 Ali Çehreli wrote:
> On 10/11/2012 10:13 AM, Jonathan M Davis wrote:
> > (arguably no one should really be using hash_t or equals_t at this
> 
> point, but
> 
> > I don't know if they're ever going to actually go away).
> 
> I've been assuming that they were relatively newer aliases. Is it
> recommended to use size_t and bool instead?

They're old. equals_t was done because D1 uses (used?) int for opEquals 
instead of bool. I don't know if there was ever a good reason for hash_t to 
exist. I don't believe that TDPL uses either, and I believe that they've been 
mostly removed from druntime and Phobos (if they haven't been entirely removed 
yet, they will be, aside from the aliases themselves).

So, I would definitely recommend not using equals_t or hash_t, but while some 
of us are definitely looking to get rid of them entirely, I suspect that 
they'll be around semi-permanently just to preserve backwards compatibility.

- Jonathan M Davis


More information about the Digitalmars-d mailing list