Cppcon tonight at 8:30 in Bellevue

Andrei Alexandrescu via Digitalmars-d-announce digitalmars-d-announce at puremagic.com
Thu Sep 22 07:03:04 PDT 2016


On 9/21/16 7:37 PM, Walter Bright wrote:
> On 9/21/2016 3:48 PM, Brad Anderson wrote:
>> http://www.elbeno.com/presentations/using-types-effectively/presentation.html
>>
>
> Sorry I wasn't clear. The free entry is only for the 8:30 talk.

Slides are nice, I hope the talk was good. His notion of total functions 
gets a bit weakened by the existence of the default constructor (e.g. if 
the return type has a default value, you can always write a total 
function that just returns it). In order to avoid such degenerate cases, 
he'd need to add the requirement that the function is also injective 
(maps different inputs to different outputs). Then his examples are 
meaningful (and beautiful).

In D, the closest we get to the notion of a total function is a nothrow 
pure function. As far as I know we cannot enforce injectivity.


Andrei



More information about the Digitalmars-d-announce mailing list