On Saturday, 17 September 2016 at 11:59:53 UTC, cym13 wrote:
Note how a leading dot means “global scope” but a dot after something means UFCS or method/attribute. What should this program do? If it is akin to “auto i = [1, 2, 3]; .filterEven();” then i is an int[] and the program prints “Nothing here”. But if it is understood as “auto i = [1, 2, 3].filterEven();” then i is whatever type filter returned and nothing is printed.


Entirely aside from removing semi-colons or not the global dot operator needs to be killed with fire and replaced with something more explicit. It's far too rarely used to justify such an easily confused and meaningless grammar.

Reply via email to