Closed d4tocchini closed 10 years ago
@d4tocchini - could you explain why a Command Array is needed / preferred?
This is actually an old, and now outdated comment... I'm now ok with compiling out an object with a commands
property for the Command Array. I use an array to store the command instructions for a few reasons:
Of course, there are drawbacks...
Also, I no longer use var commands. Vars are created dynamically in the cassowary web worker (the-gss/engine/src/Thread)... On that note, I've received requests to require vars to be declared with something like @var
, but years of coffeescript has gotten me addicted to more implicit / literate syntax.
What were your thoughts?
I was really just trying to put the pieces together when I asked. Things makes a bit more sense now I've gotten more familiar.
Recursion is elegant if you can get away with it. I suppose there's no real danger of the array getting that deeply nested that you run out of memory.
Implicit variable declaration just takes some getting used to. I thought it was weird in CoffeeScript at first but then I got used to it.
For the CCSS Statement,
Right now, the parser spits out,
Instead, it needs to produce an array of instructions, the Command Array of the form,
errr...