My Meeting C++ Keynote video is now available

Andre Pany andre at s-e-a-p.de
Mon Jan 14 21:22:32 UTC 2019


On Monday, 14 January 2019 at 21:08:50 UTC, Ben Jones wrote:
> On Saturday, 12 January 2019 at 15:51:03 UTC, Andrei 
> Alexandrescu wrote:
>> https://youtube.com/watch?v=tcyb1lpEHm0
>>
>> If nothing else please watch the opening story, it's true and 
>> quite funny :o).
>>
>> Now as to the talk, as you could imagine, it touches on 
>> another language as well...
>>
>>
>> Andrei
>
> A lot of the questions were about documenting the hook API and 
> catching misspelling errors when defining a hook.
>
> It seems like it would be nice if you could list the hook 
> method names a static array or dictionary or struct containing 
> a field for each method, etc.  One each for the required and 
> optional methods.
>
> The hook author could grab the name/signature of the method 
> they're intending to implement from that data structure and any 
> misspellings would be caught immediately.
>
> Is it possible to declare a function whose name is a CTFE 
> computed string?

For ranges there are concepts like Input Range. A struct/class 
must have several methods to be compliant. You can check the 
compliance using function isInputRange
  
https://dlang.org/library/std/range/primitives/is_input_range.html

Maybe something similiar can be done here. Not checking 
individual methods, but concepts...

Kind regards
Andre


More information about the Digitalmars-d-announce mailing list