bloom-lang / bud

Prototype Bud runtime (Bloom Under Development)
http://bloom-lang.net
Other
854 stars 60 forks source link

enforce use of sync_do #257

Open jhellerstein opened 12 years ago

jhellerstein commented 12 years ago

It's not good that we expect users to say sync_do in their Ruby code, but we don't enforce it when it's required.

neilconway commented 12 years ago

Without major changes, this would be impossible to do statically (since using sync_do is only necessary when the Bud instance is currently running asynchronously).

Enforcing it at runtime would be possible, but there are currently lots of different ways to get at Bud-private state (e.g., collection names, Bud methods, etc.), so we'd need to add checks to a lot of places.

jhellerstein commented 12 years ago

We could easily guard the collection names at least, which is the common case.