Re: Templates/Mixin - Is there a way to see expanded source code equivalent?

2025-08-24 Thread monkyyy via Digitalmars-d-learn
On Monday, 25 August 2025 at 02:36:01 UTC, Brother Bill wrote: also just factor it out and unit test it if its complex

Re: Templates/Mixin - Is there a way to see expanded source code equivalent?

2025-08-24 Thread Richard (Rikki) Andrew Cattermole via Digitalmars-d-learn
On 25/08/2025 2:36 PM, Brother Bill wrote: Is there a way to see expanded templates/mixins as the D compile expands it? This would be nice for pedagogical purposes. -mixin= expand and save mixins to file specified by

Templates/Mixin - Is there a way to see expanded source code equivalent?

2025-08-24 Thread Brother Bill via Digitalmars-d-learn
Is there a way to see expanded templates/mixins as the D compile expands it? This would be nice for pedagogical purposes.

Re: Expanded source code

2009-06-19 Thread Paul D. Anderson
Ary Borenszweig Wrote: > Paul D. Anderson wrote: > > Paul D. Anderson Wrote: > > > >> Is there a way to see the source for a D program after the mixins and > >> templates, etc., are expanded? > >> > >> I get occasional error messages saying I've got incompatible types, for > >> example, but the

Re: Expanded source code

2009-06-19 Thread Ary Borenszweig
Paul D. Anderson wrote: Paul D. Anderson Wrote: Is there a way to see the source for a D program after the mixins and templates, etc., are expanded? I get occasional error messages saying I've got incompatible types, for example, but the error message only makes sense when I mentally instant

Re: Expanded source code

2009-06-18 Thread Paul D. Anderson
Paul D. Anderson Wrote: > Is there a way to see the source for a D program after the mixins and > templates, etc., are expanded? > > I get occasional error messages saying I've got incompatible types, for > example, but the error message only makes sense when I mentally instantiate a > templat

Re: Expanded source code

2009-06-17 Thread Ary Borenszweig
BCS escribió: Reply to Paul, Is there a way to see the source for a D program after the mixins and templates, etc., are expanded? Descent has a "compile time view" that is supposed to do some of this. If you are only looking at string mixins you can use pragma(msg, string) to view the stri

Re: Expanded source code

2009-06-17 Thread BCS
Reply to Paul, Is there a way to see the source for a D program after the mixins and templates, etc., are expanded? Descent has a "compile time view" that is supposed to do some of this. If you are only looking at string mixins you can use pragma(msg, string) to view the string I get occ

Expanded source code

2009-06-17 Thread Paul D. Anderson
Is there a way to see the source for a D program after the mixins and templates, etc., are expanded? I get occasional error messages saying I've got incompatible types, for example, but the error message only makes sense when I mentally instantiate a template. Is there a way to see this instant