Preferred Alias Declaration Style
Basile B.
b2.temp at gmx.com
Wed Jun 27 14:32:39 UTC 2018
On Wednesday, 27 June 2018 at 14:29:18 UTC, Basile B. wrote:
> On Wednesday, 27 June 2018 at 14:23:25 UTC, Uknown wrote:
>> On Wednesday, 27 June 2018 at 14:01:06 UTC, Basile B. wrote:
>>> [...]
>>
>> You can use this syntax for functions :
>>
>> `alias proto_identifier = void function();`
>
> Nah it's not the same thing ;)
>
> ----
> void main()
> {
> alias void proto_identifier_old();
> alias proto_identifier_new = void function();
> assert(!is(proto_identifier_old == proto_identifier_new));
> // passes
> }
> ----
>
> - proto_identifier_new is a function type (stuff)
> - proto_identifier_new is a function **pointer** type (e.g
> &stuff)
>
> Actually my answer was more informative because i reported this
> limitation years ago, see
> https://issues.dlang.org/show_bug.cgi?id=16020.
Ah s**t i meant
- proto_identifier_old is a function type (stuff)
- proto_identifier_new is a function **pointer** type
More information about the Digitalmars-d-learn
mailing list