Transition for removing functions from Object [Compiler devs in particular, please read]

Idan Arye GenericNPC at gmail.com
Tue May 28 06:36:49 PDT 2013


On Tuesday, 28 May 2013 at 09:02:32 UTC, Jacob Carlborg wrote:
> On 2013-05-28 04:28, Lionello Lunesu wrote:
>
>> I think this works just fine, you just have to drop the 
>> writeln(). foo()
>> doesn't return anything, but prints itself.
>>
>> But yet, super should just work: it should be a variable of 
>> type C and
>> treated as such.
>
> What about "this".

`this` works with UFCS, but poses another problem:

     class C{
         void foo(){
             writeln(this.toString());//UFCS
             writeln(toString());//Won't work with UFCS
         }
     }


More information about the Digitalmars-d mailing list