Skip to content

Disallow optional parameters in parsers and controls, deprecate in abstract methods - #1394

Open
shyukahn wants to merge 1 commit into
p4lang:mainfrom
shyukahn:opt-params-abstract
Open

Disallow optional parameters in parsers and controls, deprecate in abstract methods#1394
shyukahn wants to merge 1 commit into
p4lang:mainfrom
shyukahn:opt-params-abstract

Conversation

@shyukahn

Copy link
Copy Markdown

Closes #1383
This PR is made from the April 2026 P4 LDWG meeting.

The PR explicitly disallows optional parameters in parser/control declarations and deprecates the use of optional parameters in abstract methods.

Allowing optional parameters in abstract methods is deprecated, and is planned to be disallowed in the future.

@jonathan-dilorenzo @rcgoodfellow @jafingerhut I added this sentence under Section 6.8.2. Optional parameters for now, but would there be a better place to mention deprecated features in the specification, e.g. a new section in the Appendix?

…ecate optional parameters in abstract methods

Signed-off-by: Sehyuk Ahn <shyukahn@gmail.com>
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.

Are @optional parameters allowed in abstract methods?

1 participant