zeolite-lang v0.8.0.0 Release Notes

Release Date: 2020-08-07 // over 1 year ago
  • Language

    • [breaking] Makes the semantics of cleanup more consistent:

      • [breaking] Disallows statements that modify return values within cleanup blocks, i.e., return with values and assigning named returns.
      • [new] Allows cleanup to access named returns that are initialized within the corresponding in statement. Previously, access required initialization before the in statement.
      • [new] An explicit positional return (e.g., return 1, 2) will assign the values to the respective named returns, if applicable. This will make the actual return values available within cleanup.
      @type get () -> (Int)
      get () (foo) {   // foo is the name of the return variable
        cleanup {
          \ bar(foo)   // foo has been initialized by the time this is called
        } in return 1  // 1 is assigned to foo here
      • [fix] Adds unwinding of cleanup blocks when used with break and continue, respecting loop boundaries. Previously, cleanup was ignored.
    • [breaking] Skips compilation of unreachable statements. The target use-case is temporary changes to code that circumvent parts of a procedure, e.g., an early return for the purposes of debugging.

    • [breaking] Marks statements following break and continue as unreachable.

    Compiler CLI

    • [behavior] Adds a compiler warning for public_deps that are not required by public .0rp sources within the same module, since they are potentially just cluttering the public namespace of the module.