Skip to content
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

Use actual names for Generics instead of T #859

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

Conversation

jwoertink
Copy link
Member

Fixes #836

There's a ton of places where T gets used, so I'll have to take some time to think out if all of them are necessary to change, or if just the ones where named collisions can happen....

Copy link
Member

@matthewmcgarvey matthewmcgarvey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not so sure about AvramModel because it hides that it's a generic.

Is it possible to use _T or _Avram_T or something like that?

@jwoertink
Copy link
Member Author

Yeah, I debated on this too. I originally went with ModelT 😂 but it felt so hokey... Maybe _T would be better? I think the discord chat at the time had suggested LuckyT, but that also didn't feel right. Avram_T is a decent option too 🤔

Copy link
Contributor

@robacarp robacarp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have no problem with this. I don't think it's opaque to call it AvramModel, thats what it would look like if it were a type alias, and that's essentially what this is.

@jwoertink jwoertink marked this pull request as ready for review August 7, 2022 18:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Using the generic name T in an operation name will case after_save to fail silently
3 participants