digitalmars.D.learn - "string".mixin;
- Andre (7/7) Mar 06 2013 Hi,
- Andrej Mitrovic (3/4) Mar 06 2013 UFCS is a function feature, not a statement feature. And mixin is a
- Andre (10/14) Mar 06 2013 I suspected s.th. like that, although it feels really component like
- Timon Gehr (2/17) Mar 06 2013 No, it's a max. 5 min parser hack.
Hi, I wonder why UCFS is not working for the MIXIN statement? "writeln(\"Hello World!\");".mixin; Error: identifier expected following '.', not 'mixin' This would be some nice syntax sugar. Kind regards André
Mar 06 2013
On 3/6/13, Andre <andre s-e-a-p.de> wrote:I wonder why UCFS is not working for the MIXIN statement?UFCS is a function feature, not a statement feature. And mixin is a statement, not a function.
Mar 06 2013
Am 06.03.2013 17:01, schrieb Andrej Mitrovic:On 3/6/13, Andre <andre s-e-a-p.de> wrote:I suspected s.th. like that, although it feels really component like programming if I could write: funcA().mixin; // func A returns a const string or also immutable char[] texture = "file.b".import; But yes you are right, they are statements and this would be no clean UCFS syntax and also huge effort to change I think. Kind regards AndréI wonder why UCFS is not working for the MIXIN statement?UFCS is a function feature, not a statement feature. And mixin is a statement, not a function.
Mar 06 2013
On 03/06/2013 05:20 PM, Andre wrote:Am 06.03.2013 17:01, schrieb Andrej Mitrovic:No, it's a max. 5 min parser hack.On 3/6/13, Andre <andre s-e-a-p.de> wrote:I suspected s.th. like that, although it feels really component like programming if I could write: funcA().mixin; // func A returns a const string or also immutable char[] texture = "file.b".import; But yes you are right, they are statements and this would be no clean UCFS syntax and also huge effort to change I think. ...I wonder why UCFS is not working for the MIXIN statement?UFCS is a function feature, not a statement feature. And mixin is a statement, not a function.
Mar 06 2013