Skip to content

Implement a flag for unstable features #317

@stringhandler

Description

@stringhandler

Project

compiler

Describe the feature

We are currently (v0.5.0) adding a lot of new features to simc. Some of these features are high risk and while they may be tested, may still contain unexpected behaviour and may be changed/fixed, which would result in a different CMR being generated.

I suggest we add an argument -Z or --unstable-features for enabling and feature flagging code that is already in the master branch so that we can:

  1. Release new versions without needed to revert
  2. Communicate easily with users that some features may change in future and should not be used in high risk programs.

For example, we have recently merged the use keyword which allows users to include multiple source files. I would suggest that this feature in particular is gated as an unstable feature.

Out of interest, this is usually quite easy to implement, because most new features will add new keywords to the lexer and we can simply check at lexing stage whether the unstable feature is allowed or not.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions