holochain / hdk-assemblyscript

The Holochain Developer Kit for Assemblyscript
41 stars 2 forks source link

adds prototype of capabilities decorator #23

Open willemolding opened 5 years ago

willemolding commented 5 years ago

Closes #22

willemolding commented 5 years ago

How do we like this as an example? It feels pretty good to me but seems kind of awkward that a single typo can create a whole new capability.

Another idea might be to use namespaces to represent capabilities e.g.

@capability
namespace main {
  function zomeFunction1() {}
  function zomeFunction2() {}
}

This would reduce the number of decorators needed and eliminate the @zome_function one entirely as all functions in a capability namespace would be zome functions