On D in competitive programming
Jim Balter
Jim at Balter.name
Sun Jul 29 07:51:00 UTC 2018
On Saturday, 28 July 2018 at 21:33:04 UTC, Ivan Kazmenko wrote:
[snip]
>> 2. When you briefly explain templates I think it's important
>> to mention that empty parentheses may be omitted to allow the
>> reader to make the link between function!(arg1)(arg2) and
>> map!something. Explaining UFCS isn't necessary there though I
>> think since it's obvious that there is some kind of chaining
>> at play (not that you did, just thinking out loud).
>
> Yeah, good point, mentioned it now.
Actually, map!something does not drop empty parentheses, so
mentioning that does not help. Parentheses containing 0 or 1
arguments can be omitted ... and you omit them for 1 argument in
3 places, and no instances of omitted empty parentheses. And I
think it would be less confusing to an unfamiliar reader to
mention UFCS, because the chained calls don't fit the function
!(args1) (args2) syntax that you mention.
[snip]
More information about the Digitalmars-d-announce
mailing list