mixin template FAIL
James Miller
james at aatch.net
Fri Feb 24 16:53:01 PST 2012
On Feb 25, 2012 9:08 AM, "Zach the Mystic" <
reachzachatgooglesmailservice at dot.com> wrote:
>
> On 2/23/12 7:33 PM, Ellery Newcomer wrote:
>>>
>>> import std.stdio;
>>>
>>> mixin template helpMe()
>>> {
>>> writeln("Satisfying!");
>>> }
>>
>> does it do that if you replace the statement with a declaration?
>>
>> like this:
>>
>> mixin template helpMe()
>> {
>> int durrr = (writeln("Satisfying!"), 1);
>> }
>
>
> No, it doesn't. You're right. I guess I have a long way to go to learn
these things.
>
> Thank you. Even at my primitive level, though, I can see how awesome
these things could be once you know how to program them. Does any other
language come close to D in terms of generics? I don't know, I'm just
asking?
>
> Zach
Lisp macros. But that's not a fair comparison, Lisp's object system was
built using their macros...
--
James Miller
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/digitalmars-d-learn/attachments/20120225/5bc4d39b/attachment.html>
More information about the Digitalmars-d-learn
mailing list