Version 2.11
This version is a minor release which fixes some issues from 2.10 and brings in some new features and improvements.
What's new
- Added the
for var in array {...}
construct, to iterate over an array (436a730) - Added the cross (
~X
) and zip (~Z
) meta-operators from Perl 6 (22f950b) - Added support for checking multiple return-types. (9998e5c)
- Added the rational-division operator (
//
) which creates aMath::BigRat
object (2eac143) - Added the
Array.map_with_index{}
method (3ae5182) - Added the
String.prepend()
which adds a sub-string in front of the self string. (6f5fefb) - Added the
Array.fetch()
andHash.fetch()
methods to fetch a value with a default value (5edff8a)
Improvements
- All variables are now block-scoped, instead of function-scoped. (3507cad)
- Simplified and improved the
local
variables (4409629) - Extended the
String.contains()
method to support regular expressions. (87b8a4a) - Memoization of functions and methods is considerably faster. (6059550)
Array.sum()
andArray.prod()
will accept an argument as a starting value (775fe8f)- Generalized the
Array.index()
andArray.rindex()
to work with objects of any type (d9b1608) - Optimized the
Array.rotate()
method (b73f61a) - Improved the support for assertions to display exactly where the assertion failed (0350534)
die
andwarn
keywords will now display the file and the line number (8710936)- Improved greatly the
-O1
optimization level to cover more constructs (b18f611 e3a1a1f)
Changes
- Modified the
read()
built-in function to accept a message and a type. (de7537b) do
is no longer considered a keyword, unless it is followed by a pair of curly brackets.- Bare blocks can no longer be called with named parameters (3f492c1)
Bug-fixes
- Minor bug-fix in deparsing block arguments with default values. (974f33d)
- Minor bug-fix inside the parser regarding the declaration of variables (451f169)
nil
values are now displayed correctly in interactive mode (-i
) (adebde5)