Uphill
via Digitalmars-d
digitalmars-d at puremagic.com
Mon Jun 1 22:58:41 PDT 2015
On Monday, 1 June 2015 at 18:54:18 UTC, Jonathan M Davis wrote:
> It sounds to me like you're too against macros for your own
> good. Sure, they suck, but that's just life with C++ unless you
> want to make life harder for yourself. Simply wishing that the
But it doesn't make my C++ life harder, it makes my C++ life
better. I don't need them, where I would use macros in C, I can
usually make do with a constexpr or a template and get type
safety and more readable code.
But I hope you see my point that __FILE__ and __LINE__ would be
better done with introspection, also in D? Such "magic cookies"
are signs of a lack of orthogonality.
(And it can be done as hidden registers/parameters in the
language implementation so that you can have separate compilation
and compile time evaluation of introspection where possible.)
More information about the Digitalmars-d
mailing list