How can I dump an expression into log and execute it
John Colvin via Digitalmars-d
digitalmars-d at puremagic.com
Mon Jul 14 11:53:46 PDT 2014
On Monday, 14 July 2014 at 16:46:08 UTC, Dicebot wrote:
> On Monday, 14 July 2014 at 16:10:54 UTC, Ary Borenszweig wrote:
>> Making macros look like regular function calls, that you might
>> not like. For me, it makes the code more readable. Instead of
>> this:
>>
>> class Foo
>> mixin(property :foo)
>> end
>>
>> Or this:
>>
>> class Foo
>> property!(:foo)
>> end
>>
>> You simple write this:
>>
>> class Foo
>> property :foo
>> end
>>
>> And it's super clear to everyone what this does (again: or
>> read the docs or check the source code to see what this does).
>
> Well as soon as it has own unique syntax it is not what I call
> "silent". Though `mixin` is much more notable than single :
> symbol but that is less of an issue.
>
> This is exactly the point where I consider mixins + AST
> relfection functionally equivalent to macros.
Seeing as good ast reflection would form part of any ast macro
system, perhaps everyone could agree to focus on designing the
reflection syntax/semantics first, whether or not they ultimately
want a macro system too.
More information about the Digitalmars-d
mailing list