v0.21.0
Pre-release
Pre-release
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 incase-when
.
- As a call back method for methods of Array such as
- 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 atwhen
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 atwhen
condition.
- Supported
- Introduced a
when
label inswitch
statement.- This can be used a substitute of a
case
label, and it will dobreak
automatically by default. - When specifying
fallthrough;
at the last statement of awhen
clause, it will be fallthrough. - The label instead of
default:
iselse:
which will dobreak
automatically at the end of statements. - The
fallthrough
keyword in acase
is meaningless and it will be ignored. - You can mix a
case
label and awhen
label, but it is not recommended. switch-when
is a statement and it is same asswitch-case
except a behavior ofbreak
andfallthrough
.
- This can be used a substitute of a
- 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
- OLD
- Some bug fixes and improvements.
- Obsoleted a dot style of string literal like