consequences of removing semicolons in D like in Python
ixid via Digitalmars-d
digitalmars-d at puremagic.com
Sat Sep 17 14:57:32 PDT 2016
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.
More information about the Digitalmars-d
mailing list