literalif
Literalif is a proposed conditional construct in programming language design that returns one of two literal values based on a condition, with an emphasis on preserving literal values and enabling compile-time evaluation.
Syntax and semantics: literalif (condition, trueValue, falseValue). Both trueValue and falseValue are intended to be literals
Examples: literalif (flag, 1, 0) yields 1 when flag is true, otherwise 0. literalif (env == "prod", "minified",
Typing and rules: the resulting type of literalif is typically the common literal type of trueValue and
Implications and limitations: literalif aims to improve compile-time evaluation and observability of literal values, but it
History and related concepts: The idea appears in language-design discussions and experimental features focused on literal-oriented