Browse files

More comments regarding the use of `when` with CoffeeScript

  • Loading branch information...
1 parent 5b0e181 commit 6fe5069d50bf1971ac85732c8f8cb169e535891b @wilkinson committed Jul 18, 2012
Showing with 4 additions and 8 deletions.
  1. +4 −8 src/quanah.js
12 src/quanah.js
@@ -1182,14 +1182,10 @@
// turn out to be crucially important for expressing certain concurrency
// patterns idiomatically :-)
- // NOTE: The existence of the `when` function almost certainly causes a
- // conflict with CoffeeScript's `switch/when/else` construct. As always,
- // I strongly recommend development directly in JavaScript, but if you
- // prefer to write applications in another language, you will need to
- // "compile" it to JS before using it with Quanah. If you encounter any
- // problems in the opposite direction, such as compiling Quanah into a
- // different language, please let me know so I can determine if the error
- // is due to Quanah or due to the target language's compiler.
+ // NOTE: The existence of the `when` function here does not, in my tests,
+ // cause any conflict with CoffeeScript's `switch/when/else` construct
+ // unless you try to assign a reference to some local variable "when".
+ // The easy workaround is to use a non-reserved symbol like "after" :-)
var args, flag, i, stack, temp, x, y;
args =;

0 comments on commit 6fe5069

Please sign in to comment.