Created attachment 470 [details] The patch partly implements this enhancement This is a suggestion to implement the uniform function call syntax that was talked about in the first D conference. See the newsgroup thread for more info: http://www.digitalmars.com/webnews/newsgroups.php?art_group=digitalmars.D&article_id=97654 I've supplied a patch that partly implements this enhancement. Literals don't work with the patch, this works with the patch: x.foo(), this doesn't work: 3.foo(). I think the parser or similar must be changed for 3.foo() to work. I'm not sure if any of the added types in the patch should be removed or if some other types should be added.
This is feature is described in TDPL under 5.9.1 "Pseudo Members and @property Attribute".
*** Issue 6970 has been marked as a duplicate of this issue. ***
Related: - Issue 662 - Allow UFCS for basic types and enums - Issue 6277 - Disallow short floating point literals
https://github.com/D-Programming-Language/dmd/pull/582 https://github.com/D-Programming-Language/phobos/pull/378
Commit pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/b7742f7a733ff73d364c6ed54af70d875d7e911b Merge pull request #582 from 9rnsr/fix3382_ufcs Issue 3382 - [tdpl] Implement uniform function call syntax