Can signatures be made simpler and error messages be made better?

Elronnd elronnd at elronnd.net
Sun Jun 13 01:00:11 UTC 2021


On Saturday, 12 June 2021 at 08:58:47 UTC, zjh wrote:
> On Saturday, 12 June 2021 at 08:13:42 UTC, Ola Fosheim Grøstad 
> wrote:
>> One of the things I don't like about C++ is that signatures
>
> Life cycle is an range, should used `belonging to(∈), equal 
> to(==), including(∈,flips)`, and the opposite`(¢,!=)`.

∈ is wrong; one lifetime isn't a _member_ of another, but a 
_subset_ (if it dies first) or a _superset_ (if it dies after).

That being said, I think the <= notation is appropriate.  In 
particular, it mirrors type theory, where T≤U means that T is a 
subtype of U.


More information about the Digitalmars-d mailing list