waterbearlang / waterbear

Visual block syntax for programming languages
http://waterbearlang.com/
358 stars 88 forks source link

Reactive expressions #1215

Closed dethe closed 8 years ago

dethe commented 9 years ago

There is a line in blocks.js:

expressions are eagerly evaluated against scope, contains are late-evaluated I'm not yet sure if this is the Right Thing™

By now we've encountered enough bugs due to this decision that I can conclusively say this is the Wrong Thing™ to do. We arguments that are evaluated as they change. For example:

  1. Looping over a boolean variable only works if we notice when the variable changes to false.
  2. Changing values in the blocks should be reflected in running code so you can play interactively with it.
  3. Any control flow blocks will have similar issues.
dethe commented 9 years ago

Related to #1202

dethe commented 8 years ago

Not entirely fixed, but as good as it is going to get for now, in #1255