Skip to content

v0.21.0

Pre-release
Pre-release
Compare
Choose a tag to compare
@github-actions github-actions released this 15 Feb 13:24
· 2193 commits to 3eddd028fc0cbfc90c52fda4f892fbd48789cc20 since this release

Updates from v0.20.1

  • Updated
    • Obsoleted a dot style of string literal like .abc which means "abc".
      • This is changed to another feature.
      • Newly .abc is a function object which means { => _1.abc.isFunction ? _1.abc() : _1.abc }.
      • And also .is*** like .isFunction to check a type is a function object which means { => _1.is*** }.
      • This feature will care for the purpose below.
        • As a call back method for methods of Array such as Array#map, Array#filter, and so on.
        • As a function object placed at a when clause in case-when.
    • Updated case-when features.
      • Supported ^ as a pin operator.
      • Supported an lvalue of array with index at when condition.
      • Supported | operator for multiple conditions called as alternative pattern at when condition.
      • Supported putting a function object to check the result by function call at when condition.
      • Changed to make it error when the length of array is mismatched.
      • _ means to ignore binding a value at when condition.
    • Introduced a when label in switch statement.
      • This can be used a substitute of a case label, and it will do break automatically by default.
      • When specifying fallthrough; at the last statement of a when clause, it will be fallthrough.
      • The label instead of default: is else: which will do break automatically at the end of statements.
      • The fallthrough keyword in a case is meaningless and it will be ignored.
      • You can mix a case label and a when label, but it is not recommended.
      • switch-when is a statement and it is same as switch-case except a behavior of break and fallthrough.
    • Updated some type system.
      • For type check in a language server.
      • Making a compile error when it is unknown type or type mismatch in assignment.
    • I am very sorry but, after a reconsideration I desided to change a syntax for a return type of native again.
      Instead, It was possible to add a syntax that you can specify a return type also for a normal function.
      However note that a return type for a normal function is currently just an information to the language server.
      • OLD
        • native:int
      • NEW/ADD
        • native funcname(args):int
        • function funcname(args):int
        • public funcname(args):int
        • private funcname(args):int
    • Some bug fixes and improvements.