D metaclass stuff vs C++23

Russel Winder russel at winder.org.uk
Mon May 13 09:06:07 UTC 2019


Hi,

In the "show what can be done, not what should be done" category,
someone has done a C++ version of Hello World using the up-coming
metaclass stuff:

https://twitter.com/Cor3ntin/status/1127210941718962177

I immediately (once I knew about it) replied with the Python version:

https://twitter.com/russel_winder/status/1127859587393163265


   class Hello: pass

   World = None

   if __name__ == '__main__':
       print(" ".join([item for item in dir() if not item.startswith("_")]))


but clearly a better competitor would be a D version. Anyone done this
sort of thing, i.e. compile time metaclass manipulation?

 
-- 
Russel.
===========================================
Dr Russel Winder      t: +44 20 7585 2200
41 Buckmaster Road    m: +44 7770 465 077
London SW11 1EN, UK   w: www.russel.org.uk

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: This is a digitally signed message part
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20190513/f8fcf2bf/attachment.sig>


More information about the Digitalmars-d mailing list