API for casting Value to Op.Result and Block.Parameter

XMLWordPrintable

    • Type: Enhancement
    • Resolution: Unresolved
    • Priority: P4
    • None
    • Affects Version/s: repo-babylon
    • Component/s: core-libs

      Converting a Value to an Op.Result or a Block.Parameter requires either pattern matching or explicit casting. Pattern matching leads to dangling else branches and creates noise, while explicit casting is messy and can cause confusion with the ClassCastException. We can simplify the conversion with methods that assert a Value is either an Op.Result or Block.Parameter, throwing an exception if it fails.

            Assignee:
            ruby chen
            Reporter:
            ruby chen
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: