- Timestamp:
- 10/17/06 08:26:56 (2 years ago)
- svk:copy_cache_prev:
- 21206
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
ChangeLog
r14376 r14378 137 137 * Array and Hashes now round-trips from Pugs to Perl 5 land and back 138 138 * Passing unboxed values across runtimes no longer leaks memory 139 * When embedding Perl 5.8+, Unicode flag is now on for Pugs-to-Perl5 strings 139 140 140 141 === Lexical Syntax … … 149 150 * POD directives: `=begin`/`=end` and `=for` now terminate without `=cut` 150 151 * `%h<>` now means `%h{}` -- the entire hash, not the empty string as key 152 * `1<2>` is now a fatal error: Odd numbers of elements in Hash 153 * List comprehension: `for 0 < list(@x) < 10 {...}` 151 154 152 155 === Declarators and Operators … … 158 161 * Binding to qualified uninitialized symbols: `&fully::qualify := sub {...}` 159 162 * Postfix operators can be called with a dot: `.++`, `$x.++`, `$x.\ ++` 163 * Mid-block redeclaration no longer allowed: `my $x; { $x = 1; my $x = 2 }` 164 * Smart matching against implicit invocation: `$obj ~~ .meth`, `$obj ~~ .[0]` 160 165 161 166 === Blocks and Statements … … 169 174 * `do {...}` is now a loop block that takes standard loop controls 170 175 * New postfix `given` statement modifier: `.say given foo()` 176 * `&take` now works in functions called from within a `gather {...}` block 177 * `&take` no longer flattens array literals: `take [1,2,3];` 178 * Implicit invocation in `when`: `when .true {...}`, `when .<key> {...}` 179 * Loop topic is not forced into rw: `for 1..3 { $_++ }` now fails correctly 171 180 172 181 === Regexes and Grammars … … 180 189 * Allow space-separated adverbial named arguments: `f( :x<foo> :$y :!z )` 181 190 * Parse for the `proto` routine modifier: `proto method foo ($x) {...}` 191 * Multi-dispatching now handles named, slurpy and optional arguments 192 * Support for user-defined unary and optional-unary prefix macros 193 * `sub f ($x is lazy) {...}` no longer evaluates $x more than once 194 * `sub ($x = 0 is copy)` no longer allowed; say `sub ($x is copy = 0)` instead 182 195 183 196 === Classes and Objects … … 187 200 * Quantified method calls: `$obj.*meth`, `$obj.+meth` and `$obj.?meth` 188 201 * Default expression for attributes: `class C { has $.x = 123 }` 189 190 === Built-in Functions 191 192 * New `"emeta` primitive for escaping strings 193 * New `&printf` primitive for formatted printing 202 * Attribute-like method call syntax: `@.method(1)`, `$.method: 2, 3, 4` 203 * Role mixins: `role R {...} class C does R {...}` 204 * Circular mixin is no longer allowed: `role A does A` 205 206 === Built-in Primitives 207 208 * New `"emeta` function for escaping strings 209 * New `&printf` function for formatted printing 210 * New `&comb` function, a dual to `&split` but matches the wanted parts 194 211 * The `.as` method is renamed to `.fmt` for formatted printing 195 212 * Support for `%b` in formatted printing 213 * The `.perl` method now returns Unicode strings 196 214 197 215 --- >8 --- >8 --- >8 --- >8 --- >8 --- >8 --- >8 --- >8 --- >8 --- >8 --- … … 207 225 as YAML 208 226 * Implemented staleness checking for .yml/.pm loader 209 * The following code is no longer allowed:210 my $x;211 {212 $x = 1;213 my $x = 2;214 }215 * "role A does A" is not allowed anymore216 * "my $x; { $x; my $x }" now fails with a sensible error message217 227 * Allow $::x to mean exactly the same as $x 218 * "sub ($x = 0 is copy)" is invalid; say "sub ($x is copy = 0)" instead219 228 * Pugs.Parser: $() now means $$/, @() means @$/, %() means %$/, etc 220 229 * Added identity values for the builtin reduceable operators from S03 221 230 * Implement hyperfold and hyperscan: [>>+<<] and [\>>+<<] 222 * Unicode support for the embedded Perl5 bridge. (This takes effect iff223 the embedded Perl supports SvUTF8_on, typically Perl 5.8+.)224 * Pugs.Parser: Support for attribute call syntax225 @.foo(1, 2, 3); # self.foo(1,2,3).'@'226 $.bar: 4, 5, 6; # self.bar(4,5,6).'$'227 228 * Much improve multi dispatch system229 * Implement quantified method calls: $obj.*meth, $obj.+meth, $obj.?meth,230 as well as quantified dynamic method calls: $obj.[+*?]$meth231 * User-defined macros now take effect even in prefix unary232 and optional unary233 * "Odd numbers of elements in hash" is now made fatal234 (it was not even a warning) to help shake out incorrect235 usages of things like 1<2>236 * Pugs.Prim.Keyed: Instead of allowing "1.delete();" to return undef,237 we now simply fail238 231 * Pugs.Eval: Autovivification is now constrainted by typed variables: 239 232 my Hash $x; … … 242 235 * Reduce standalone blocks even if nested: 243 236 { { { say 3 } } } 244 * Make the closure trait blocks lazy245 * Repair "use perl5:Foo"246 * Implement smart matching against implicit invocation:247 $obj ~~ .meth # ?($obj.meth)248 $obj ~~ .[0] # ?($obj.[0])249 $obj ~~ .<x> # ?($obj.<x>)250 * Implement "when .[0]" and "when .<s>"251 * Implement hyper methods:252 @obj>>meth253 @obj.>>meth254 @obj>>.meth255 @obj.>>.meth256 @obj\ .>>\ .meth257 237 * Reject named arguments that cannot find a matching named 258 238 parameter or slurpy hash 259 239 sub f () {...} 260 240 f(y => 1); # used to bind silently, but now no more 261 * "for 1..3 { $_++ }" should die, not survive262 241 * Primitive support for =@Array on both contexts 263 242 * Remove Judy from the Pugs build process … … 283 262 } 284 263 while 1; 285 * Pugs.Eval: Allow "redo" to redo the first repeat loop286 (repeat.t now all passes.)287 * "sub f ($x is lazy) {...}" is now guaranteed to not evaluate288 its argument more than once289 264 * Switch chained comparison such as "1 > 2 > die('not reached') 290 265 to use "is lazy" parameters, so they can short-circuit properly 291 * Fix expected outut of head-neck-tail in examples/:292 [1,2,3].say should print "1 2 3\n", not "123\n"293 * Fix take [1,2,3]" shouldn't flatten into "take 1,2,3294 * fix a couple of old s{}{} instances. comb potentially faster using lvalue295 substr instead of copying string296 * ".perl" now returns Unicode strings properly297 266 298 267 == Perl 6 on Perl 5 (under [misc/pX/Common/])
