Changes between Version 10 and Version 11 of Migrating to NQPrx

Show
Ignore:
Timestamp:
11/18/09 17:32:04 (5 years ago)
Author:
japhb
Comment:

Add notes about closure interpolation and whitespace/paren issues

Legend:

Unmodified
Added
Removed
Modified
  • Migrating to NQPrx

    v10 v11  
    55Here are the things I have found so far: 
    66 
    7 === $-variable interpolation in double-quoted strings. === 
     7=== $-variable and { ... } interpolation in double-quoted strings. === 
    88 
    9 I have been using qq strings because they allow backslash-interpolation, but because a bunch of my stuff generates PIR on the fly, I have " ... $P0 ... " all over the place. Needless to say, this is generating a fair amount of rework. 
     9I have been using qq strings because they allow backslash-interpolation, but because a bunch of my stuff generates PIR on the fly, I have " ... $P0 ... " all over the place. Needless to say, this is generating a fair amount of rework.  Similarly, `{ }` within double-quoted strings will be treated as a closure interpolation, expecting valid NQP code between the curly braces. 
    1010 
    1111=== Loading Parrot Bytecode === 
    1212 
    1313All uses of 'load_bytecode' need to be replaced by 'pir::load_bytecode'. 
    14  
    1514 
    1615=== Stricter POD syntax === 
     
    2827=== Stricter whitespace rules around keywords === 
    2928 
    30 `if $condition { } else {}` now requires spaces around the `else` keyword 
     29`if $condition { } else {}` now requires spaces around the `else` keyword.  Similarly `if( $condition ) {` must be replaced with `if ( $condition ) {` or `if ($condition) {` or (idiomatically) `if $condition {`.  This applies to `unless`, `while`, `until`, `for`, and so on as well. 
    3130 
    3231=== Parameter initialization ===