A New Statement for Selection and Exception Handling in Imperative Languages
Keehang Kwon

TL;DR
This paper introduces a unified selection statement for imperative languages, simplifying control flow by sequentially executing the first successful statement among multiple options, thereby unifying common selection constructs.
Contribution
It proposes a novel unifying selection statement, seqor, that consolidates if-then-else, switch, and try-catch into a single, simple semantics.
Findings
Simplifies control flow in imperative languages.
Provides a clear semantics for the seqor statement.
Examples demonstrate practical application.
Abstract
Diverse selection statements -- if-then-else, switch and try-catch -- are commonly used in modern programming languages. To make things simple, we propose a unifying statement for selection. This statement is of the form seqor(G_1,...,G_n) where each is a statement. It has a a simple semantics: sequentially choose the first successful statement and then proceeds with executing . Examples will be provided for this statement.
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsLogic, programming, and type systems · Formal Methods in Verification · Logic, Reasoning, and Knowledge
