proposal: @mixin functions to auto-mixin at call site

Timothee Cour thelastmammoth at gmail.com
Tue Sep 3 19:26:14 PDT 2013


On Tue, Sep 3, 2013 at 12:13 PM, Dicebot <public at dicebot.lv> wrote:

> On Tuesday, 3 September 2013 at 19:10:12 UTC, Jacob Carlborg wrote:
>
>> On 2013-09-03 21:05, Andrej Mitrovic wrote:
>>
>>  You are importing symbols. And when you do "foo()" you know you're
>>> calling a function. With the change, you'll never know what foo()
>>> does.
>>>
>>> This feature is never going to fly, but people are just going to argue
>>> this forever..
>>>
>>
>> With properties you never know if you're invoking a method or accessing a
>> field:
>>
>> foo.data; // call method or access field?
>>
>
> Which is exactly why parens-less calls and properties with side effects
> suck.
>

that's the whole point, it allows to transparently replace a field access
by a property function call without breaking client code. How else would
you do that?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20130903/18932c8b/attachment.html>


More information about the Digitalmars-d mailing list