On Monday, 31 October 2016 at 07:27:50 UTC, Ali Çehreli wrote:
Is the only valid remaining use for the comma operator the
'for' loop iteration?
for ( ; ; ++i, ++j) {
// ...
}
Are there other uses?
The changelog shows it can be used for an expression statement:
// This is okay, the result is not used.
if (!mc)
mc = new MyContainerClass, mc.append(new Entry);
I've made a pull to improve the comma examples, e.g. adding
brackets (mc = ...), mc.append and removing unnecessary
statements:
https://github.com/dlang/dlang.org/pull/1502
Would be good if someone could review and merge.