[Python-Dev] Proposal for C++ metaclasses

Guido van Rossum guido at python.org
Tue Jun 27 12:54:14 EDT 2017


Heh, I'm not totally surprised -- I took Python's metaclass design from a
book named Putting Metaclasses to Work, by Ira R. Forman and Scott H.
Danforth (
https://www.amazon.com/Putting-Metaclasses-Work-Ira-Forman/dp/0201433052).
The book describes a custom metaclass extension to C++ supporting
metaclasses, from which I took everything I could given that Python is a
dynamic language (the key thing I left out was automatic synthesis of
combined metaclasses when multiple inheritance sees two unrelated
metaclasses). Hopefully the authors get some credit in the current C++
standard proposal.

On Tue, Jun 27, 2017 at 7:36 AM, Steve Dower <steve.dower at python.org> wrote:

> Thought this might be interesting for those of us who live deeper in the
> language than most – this is the formal proposal to add metaclasses to C++.
>
>
>
> http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2017/p0707r0.pdf
>
>
>
> Given the differences between Python and C++, it’s obviously got a
> different approach, though I am struck by the similarities. I think it’s
> also a good presentation on the value and use of metaclasses, so likely
> also interesting for those of us who occasionally teach or explain the
> concept.
>
>
>
> Cheers,
>
> Steve
>
> _______________________________________________
> Python-Dev mailing list
> Python-Dev at python.org
> https://mail.python.org/mailman/listinfo/python-dev
> Unsubscribe: https://mail.python.org/mailman/options/python-dev/
> guido%40python.org
>
>


-- 
--Guido van Rossum (python.org/~guido)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-dev/attachments/20170627/d6341c88/attachment.html>


More information about the Python-Dev mailing list