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

Dicebot public at dicebot.lv
Wed Sep 4 07:50:49 PDT 2013


On Wednesday, 4 September 2013 at 14:42:26 UTC, Ary Borenszweig 
wrote:
> On 9/3/13 4:05 PM, Andrej Mitrovic wrote:
>> On 9/3/13, Ary Borenszweig <ary at esperanto.org.ar> wrote:
>>> When you do "import foo.bar" you are importing arbitrary 
>>> code...
>>
>> 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.
>
> Yes you know: you look at the source code, or the documentation.

You don't do it for _every single symbol_. Good good matches 
naive assumptions, this is exactly what allows to read it fast. 
Reading code where you can't make assumptions about anything is a 
transitive (possibly exponential) task. Exactly the hell you get 
with undisciplined C macro usage.


More information about the Digitalmars-d mailing list