-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
static_show: Print primitive
types with Base.reinterpret(...)
#58623
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
I really dislike the implication here that a printed |
I can spell this as |
Both of those mean you have an instance of the |
This PR is changing that definition |
a7700cd
to
76b2994
Compare
76b2994
to
3de7e15
Compare
It sounds like we have not decided whether to print an eval-able (or close to it) expression here or use a different new text-based serialization format. |
Yeah.. I think the heart of the conflict is whether we have a precise serialization (i.e. recoverable to an exact type) and then imprecise de-serialization (i.e. guesstimate when picking a 'close enough' type to map back to as a pre-compile hint), or if we instead have an imprecise serializer to begin with (that throws out / approximates type information before it even gets to I feel that we lose a lot of valuable introspection when The imprecise version just seems like it's asking for a ton of confusion when it comes time to investigate unexpected compilation, etc. |
Yes, exactly why I think this PR is bad, since it implies that our serializer is no longer intended to be a correct and precise output, but is rather that there are supposed to be various arbitrary heuristics during (de)serialization to guess what calling various random functions in various random packages (such as Pkg.reinterpret) do when executed or constructed |
That's an exaggeration IMO It reserves exactly one fully-qualified (non-)typename |
primitive
types with reinterpret(...)
primitive
types with Base.reinterpret(...)
before:
after:
I know that @vtjnash has advocated for us to provide a custom de-serializer, but I think the mental burden for users to have to worry about types that look
eval
-able (and frequently are) but in practice need a custom de-serializer is too much.