What does ! mean?
Ali Çehreli
acehreli at yahoo.com
Wed Sep 27 17:58:27 UTC 2017
On 09/27/2017 08:33 AM, Ky-Anh Huynh wrote:
> On Wednesday, 27 September 2017 at 14:34:06 UTC, Eugene Wissner wrote:
>>
>> See also the following chapter in Ali's book:
>> http://ddili.org/ders/d.en/templates.html
>
> Thanks a lot. I will keep reading :)
The fact that such an important operator is explained so late in the
book is due to the book's strong desire to have a linear flow.
Although binary ! appears before the templates chapter as to!int,
format!"%s", etc., I decided to get to templates only after going
through everything that could be templatized. (For example, even
interfaces can be templates.) I don't claim this is the best choice but
I'm happy that some people said that they found the linear flow useful.
(I know that others would find it boring. :) )
If I were to write the book again, one other thing that I would explain
earlier would be UFCS, and I would use much more of it in the examples.
(UFCS was added to the language after I wrote most of the book.)
Ali
More information about the Digitalmars-d-learn
mailing list