Hacker Newsnew | past | comments | ask | show | jobs | submit | Tsche's commentslogin

This is absolutely possible, even currently - albeit in a very much non-portable way. For example boost::pfr and my own (wip) repr library have the required machinery for this.


Interesting! There seem to be a lot of limitations though:

> Boost.PFR library works with types that satisfy the requirements of SimpleAggregate: aggregate types without base classes, const fields, references, or C arrays:

And in general seems to be dependent on C++20 for getting field names.

Do you know how this works? Initializer lists seem somehow involved.


indeed


oh no


To me it was always just a silly way of pronouncing "Python", especially in reference to terrible shenanigans like the ones the post talks about :P


I had actually considered PrePy and variations thereof for the magic_codec project (which is the example implementation showcased in that post), unfortunately all of these had been used by other projects before. Pydong is the name of the blog :)


Ah I did not realize this. Whoops. Thanks for clarifying!


I'm glad y'all like it, more to come soon :)


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: