Skip to content

Commit

Permalink
add a new trap, reword another
Browse files Browse the repository at this point in the history
  • Loading branch information
tbrowder committed Oct 30, 2018
1 parent 3995e42 commit b685036
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion docs/rakudo-nqp-and-pod-notes.md
Expand Up @@ -14,8 +14,12 @@
+ **DO use 'nqp::die'** - As opposed to '**say**', '**die**' does need to be qualified with '**nqp::**'.
If used without the '**nqp::**' prefix, you sometimes may get a very unhelpful error message.

+ **DO NOT use '$\<some-match-var>' inside a sub with a '$/' arg** - Use the full syntax for
+ **BE WARNED about '$\<some-match-var>' inside a sub with a '$/' arg** - Use the full syntax for
a match variable ('**/$<some-match-var**') for more reliable (or at least self-documenting) results.

+ **BE WARNED about '$\<a-match-var>+' versus '$\<a-match-var>\*\*1'** - The '+' will result in a concatenated object
while the '\*\*' form will result in an array. Either form may be appropriate for the situation,
but proper handling will vary for each.

+ **BE WARNED about "return if (...)" statements** - Sometimes they work and sometimes not. But the
failure message is usually good enough to find the offending code.
Expand Down

0 comments on commit b685036

Please sign in to comment.