D Primary Type Syntax is Essentially Implemented!

Quirin Schroll qs.il.paperinik at gmail.com
Wed May 24 11:09:47 UTC 2023


On Wednesday, 24 May 2023 at 05:15:27 UTC, Olivier Pisano wrote:
> On Wednesday, 24 May 2023 at 03:48:38 UTC, Andrej Mitrovic 
> wrote:
>> On Tuesday, 23 May 2023 at 22:39:44 UTC, Richard (Rikki) 
>> Andrew Cattermole wrote:
>>> Good work cleaning this up.
>>>
>>> On 24/05/2023 10:18 AM, Quirin Schroll wrote:
>>>> |// `a` takes its parameter by value; the parameter returns 
>>>> by reference. // `b` takes its parameter by reference; the 
>>>> parameter returns by value. void a( ref (int function()) ) { 
>>>> } void b((ref int function()) ) { }|
>>>
>>> Are you sure that this is correct?
>>>
>>> I read this as `a` takes its parameter by reference; the 
>>> argument returns by value.
>>>
>>> If this isn't what you intended its a little worrying because 
>>> this is going to cause problems.
>>
>> Same, this is completely counter-intuitive to me.
>
> Same here.

It's only the comments for `a` and `b` that are reversed. Still 
`a` and `c` are the same, which should have cleared things up. 
I'm sorry for the confusion. This is so embarrassing. The 
implementation is sane in your and the other commenters opinion. 
Unfortunately, the compiler has no AI to check if comments make 
sense. All the code is tested.


More information about the Digitalmars-d mailing list