- Timestamp:
- 10/17/06 08:26:52 (2 years ago)
- svk:copy_cache_prev:
- 21206
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
ChangeLog
r14373 r14376 146 146 * Signature literals: `:($foo is copy = 42, $, @)` 147 147 * Capture literals: `\($bar: 1, 2, 3, named => 4)` 148 149 === Operators 148 * POD variables: `$=DATA` and `@=DATA` 149 * POD directives: `=begin`/`=end` and `=for` now terminate without `=cut` 150 * `%h<>` now means `%h{}` -- the entire hash, not the empty string as key 151 152 === Declarators and Operators 150 153 151 154 * New infix comparison operators: `===` and `eqv` 152 155 * `*` is now always a term, never a prefix operator 153 156 * Argument interpolation via prefix `|` and `|<<` 157 * Typed declarations: `my Dog $fido`, `my T ($x, $y)` 158 * Binding to qualified uninitialized symbols: `&fully::qualify := sub {...}` 159 * Postfix operators can be called with a dot: `.++`, `$x.++`, `$x.\ ++` 154 160 155 161 === Blocks and Statements 156 162 157 163 * `BEGIN(...)`, `END(...)` etc are parsed as calls, not syntax errors 158 159 === Regex and Grammars 164 * Support for `START`, `PRE`, `POST`, `KEEP`, `UNDO`, `ENTER`, `LEAVE` blocks 165 * Support for `FIRST`, `NEXT`, `LAST` loop control blocks 166 * New `&leave` primitive to exit from the innermost block 167 * New `&break` and `&continue` primitives to use inside `when` blocks 168 * `&last` and `&redo` now work in `repeat { ... }` and `loop {...}` blocks 169 * `do {...}` is now a loop block that takes standard loop controls 170 * New postfix `given` statement modifier: `.say given foo()` 171 172 === Regexes and Grammars 160 173 161 174 * Pugs::Compiler::Rule (PCR) replaced Parrot/PGE as the default engine 162 175 * Implemented `s[...] = ...` and deprecated `s[...][...]` 163 176 164 === Subroutines 165 166 === Objects 177 === Modules and Routines 178 179 * The main package is now ::Main, not ::main 180 * Allow space-separated adverbial named arguments: `f( :x<foo> :$y :!z )` 181 * Parse for the `proto` routine modifier: `proto method foo ($x) {...}` 182 183 === Classes and Objects 167 184 168 185 * Dynamic method calls: `$obj.$meth` 169 186 * Hyperised method calls: `$obj.>>meth` 170 187 * Quantified method calls: `$obj.*meth`, `$obj.+meth` and `$obj.?meth` 188 * 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 194 * The `.as` method is renamed to `.fmt` for formatted printing 195 * Support for `%b` in formatted printing 171 196 172 197 --- >8 --- >8 --- >8 --- >8 --- >8 --- >8 --- >8 --- >8 --- >8 --- >8 --- … … 175 200 with other implementations, so macros are portable even if they don't 176 201 operate on the source level 177 * Added full support for the START trait blocks178 * The "proto" keyword is now supported179 ** "proto foo {...}" works180 ** Parse for "proto sub foo {...}"181 202 * Added support for the `each` builtin, so now you can write 182 203 for each(@a; @b) -> $x, $y { ... } 183 * Implemented postfix "given"184 204 * New Prims: `Pugs::Safe::safe_getc` and `Pugs::Safe::safe_readline`, 185 205 allowing eval servers to interface an interactive Pugs 186 206 * New `Perl6::Internals::emit_yaml` prim to dump AST programmatically 187 207 as YAML 188 * Added Math::Basic::pi per S29189 * Added *pi(), for backwards compatibility. (This is non-spec.)190 * Renamed .as to .fmt according the recent changes of the Synopses191 208 * Implemented staleness checking for .yml/.pm loader 192 * Postfix dot methods are now working:193 .++; # $_++194 $x.++; # $x++195 $x.\ ++; # ditto196 $x.+meth; # $x.meth but with quantifier197 * Added support for the "%b" modifier in `sprintf` and `fmt`, which198 requires parrot due to use of rules199 209 * The following code is no longer allowed: 200 210 my $x; … … 204 214 } 205 215 * "role A does A" is not allowed anymore 206 * Added support for the `quotemeta` builtin207 *** Partially pretty-printable; introspection API for next release208 ** Support for:209 my T ($x, $y, $z)210 to distribute as:211 (my T $x, my T $y, my T $z)212 ** Also, "my T $x" now re-assigns T into $x upon closure reentry213 Note that this is not strictly correct for "state T $x", but214 let's do it this way for now215 * Allow for rule redefinition via ->reinstall216 * Allow binding to fully-qualified, uninitialized variables:217 &foo::bar ::= sub { ... };218 * Argumentless POD introducer can now be followed by =cut correctly219 =foo220 =cut221 say "This gets run";222 * Allow "last" and "redo" in "repeat { ... }" loops223 * Implement \($x, $y, |$z, $w) splicing224 216 * "my $x; { $x; my $x }" now fails with a sensible error message 225 * "do { ... }" is now made a true block, by desugaring it into226 "repeat { ... } while False"227 * "f( :$x :$y :$z )" without commas between them is now legal syntax228 217 * Allow $::x to mean exactly the same as $x 229 * The main package is now ::Main, not ::main230 218 * "sub ($x = 0 is copy)" is invalid; say "sub ($x is copy = 0)" instead 231 219 * Pugs.Parser: $() now means $$/, @() means @$/, %() means %$/, etc … … 238 226 $.bar: 4, 5, 6; # self.bar(4,5,6).'$' 239 227 240 * Remove support for reduce+posthyper form "[+]<<" because as specced the241 hyper will recurse into arrays, so the reduce never got a chance to run242 * Support for instance default expressions (which are evaluated in243 Class composition time, not in instance creation time):244 class Foo {245 has $.x = 10;246 }247 228 * Much improve multi dispatch system 248 229 * Implement quantified method calls: $obj.*meth, $obj.+meth, $obj.?meth, … … 259 240 $x[0] = 1; # fails, as $x can _only_ vivify to Hash 260 241 * Implement rudimentary "fail" control via $*FAIL_SHOULD_DIE 261 * Changed $obj ~~ Pkg::Name to $obj ~~ ::Pkg::Name262 * Support for PRE/POST design-by-contract assertions263 * Support for KEEP/UNDO blocks264 * Pugs.Prim: Add "&leave" to leave a block, "&break" to break265 out of a "given", and "&continue" to break out of a "when"266 242 * Reduce standalone blocks even if nested: 267 243 { { { say 3 } } } … … 300 276 * Repaired quantified method calls with .*$method by treating 301 277 .* always as quantifier and never as globalizer 302 * "%x<>" now means "%x{}" -- that is, interpolating the entire hash --303 rather than ""304 278 * Parse for "class Foo is also {...}" instead of having Foo 305 279 inherit from ::also
