-
Notifications
You must be signed in to change notification settings - Fork 7
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
[Blend/generic dsl] enabled/disabled indexed #7
Comments
Second one is cleaner and takes less of a branching performance hit. Minimal, but might as well pull everything we can out of it |
Also, inline classes for things that can be enabled/disabled? |
Inline classes can implement interfaces so we could just make an Enablable interface and implement it where needed |
I don't quite understand how inline classes help here. We are talking about global state after all. fun enable(enable: Boolean = true, index: Int) = ... is best. |
Inline classes are meant to prevent the user from providing illegal arguments, nothing more. I'm no expert on the JVM, so if you think that method is better, I'll take your word for it. |
Ok, I thought you wanted to represent the state of enabled/disabled in an inline class somehow, that makes more sense. |
One think we should look into is the difference between |
Burkhard is correct on the differences of |
do you guys prefer explicit @Wasabi375 following that style proposal then the whole shall be
it's always best when default args are at the end.. |
I would like to have both. If I have 4 framebuffer and want to enable something for all of them, I don't want to make 4 enable calls, but rather the global one. Buf if I only want to enable it for only one, I'd rather have the index one. Maybe |
No wait, I think you misunderstood. We have here Shall we keep the postfix or just drop it because it's automatically when you pass |
I'm not sure what I prefer. If we drop the |
There are a couple of consideations to make:
|
I think just |
I agree with Burkhard's last point. We can't make people who don't know OpenGL use things correctly and so it should not be up to us to clarify the usages. Those who know will look and understand |
Ok, then we leave like it is for the moment |
Another thing. Given that all the enable/disable capabilities are also available through
We might also extend it for those two indexed capabilities.. proposals:
or
|
or
The text was updated successfully, but these errors were encountered: