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

Textures and queries object with lifetime targets #14

Open
elect86 opened this issue Apr 14, 2019 · 1 comment
Open

Textures and queries object with lifetime targets #14

elect86 opened this issue Apr 14, 2019 · 1 comment

Comments

@elect86
Copy link
Contributor

elect86 commented Apr 14, 2019

Texture and queries are two special identifiers which will conserve for their entire life the given/bound target (more here, also this is the same reason why create* require the target as well).

So, here a question rises: shall we promote them to normal classes with a val target?

Pro: less namespace pollution
Vs: we lose inline class benefits

Or we can encode the target into the inline class, which "extends" the base inline class. Such as
GlTexture2D : GlTexture

Pro: we keep the inline benefits (to avoid boxing we can have a method to pass the inline class itself as its "super", ie GlTexture2D::asSuper: GlTexture, whenever you have to call a method requiring that)
Vs: we get some additional identifiers

@Sylvyrfysh
Copy link
Collaborator

I would prefer the last approach. It makes more sense, adding safety rather than removing it. I see the negative being mostly a minor maintenance cost

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

No branches or pull requests

2 participants