Conversation
This is needed to allow templates to produce generic types.
Removes the use of "unsafe".
|
@ayushr2 could you have a look at this one? |
|
IIUC, we are using |
|
I couldn't agree more, but stateify doesn't yet support generics. That requires the first N-1 commits in #12470, so I was planning to send that after that PR (and this one) merge. |
|
Having said that, I could move those commits to this PR, since there is some question about whether #12470 can be merged at all. |
|
IIUC 80913f9 requires wrapping the atomic pointer fields with a struct and putting special We should probably add native support to stateify for If you intend to cleanup |
It's not that the AST parser isn't capable, it's that that state package fundamentally wants to register a Line 339 in 70f9a82 Since there's no
We perhaps could, but is that any better? This would make a poor addition to
We could, but that feels quite manual, and ergonomically worse than what exists today. Before the codegen deficiencies were pointed out in #12470 (review) my goal was to remove type parameter support from go_generics, leaving only constants. Now answering your first point:
Well, I don't disagree, but haven't come up with a cleaner way of supporting generics with stateify. I'm all ears for suggestions! |
The change to the atomicptr package is trivial, but is included here as a
motivating case for the addition of generics support to
go_generics.