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

Add proposal for #feature directive #5563

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

tangent-vector
Copy link
Contributor

This proposal is a companion to SP#012.

This proposal is a companion to SP#012.
@csyonghe
Copy link
Collaborator

I am worried that supporting individual feature flags can lead to fragmentation of possible compiler modes that we need to test and maintain support for.

Can we simply have something simpler with versions, by having #language slang 2025.1 stable and #language slang 2025.1 experimental. We are already suffering from the divergent behavior for some existing compiler flags such as -allow-glsl, and I want to be cautious to not make this situation worse.

@tangent-vector
Copy link
Contributor Author

I agree that the fragmentation could be a problem, and that it makes sense to consider a simpler alternative like an experimental language version/mode.

The main argument against making it an all-or-nothing binary switch is something like:

  • There is a spectrum of just how unstable unstable features are. Some might be close to stabilization, while others might be completely new ideas that are only half-implemented.

  • We expect many/most Slang users (including those doing production work) to write code that uses unstable features - especially those that are close to stabilization. Almost nobody doing serious work on top of Slang would be using the non-experimental mode.

  • If experimental mode is all-or-nothing, these developers will not be able to easily get confidence that their code isn't unintentionally making use of other unstable features beyond what they intended to use. It is hard for them to determine how much churn could be inflicted on them by changes across Slang compiler releases.

I suspect that on the technical side it will not be much harder for us to implement fine-grained enabling/disabling of features as compared to the all-or-nothing case, so ideally we could defer the final decision on policy until after we have more of the mechanism in place.

@csyonghe
Copy link
Collaborator

I really don't want to see every piece of slang code comes with a huge list of boilerplate #feature nonsense listing every Slang feature added in the past two years. I don't want to encourage people writing that kind of code or even make it possible to do so. I think the GLSL #extension require is particularly bad, can we please not do that.

I think your concern can be addressed with probably one more feature level, like beta, experimental etc.
I would rather us not overdo fragmentation in the beginning unless it is causing a real problem.

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr: non-breaking PRs without breaking changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants