printf, writeln, writefln

Nick Treleaven nick at geany.org
Sat Dec 10 11:13:57 UTC 2022


On Thursday, 8 December 2022 at 17:39:58 UTC, Ali Çehreli wrote:
> On 12/8/22 08:21, Salih Dincer wrote:
>
> > void stringCopy(Chars)(string source,
> >                      ref Chars target)
>
> >    sample.stringCopy = cTxt;  // disappeared ? char
>
> Nothing disappeared on my system. (?)
>
> Going off-topic, I find the expression above extremely 
> confusing. I am used to assignment expression changing the 
> value of the left hand side, but that expression changes cTxt. 
> Very confusing...
>
> Such obfuscations make it very hard for me to understand what 
> the code is trying to demonstrate.

Yes, with function call syntax it's more understandable if an 
argument is modified.

It was bizarre and confusing that assignment syntax was 
implemented for functions and methods not explicitly marked with 
@property.



More information about the Digitalmars-d-learn mailing list