|
|
|
|
|
by mirekrusin
2514 days ago
|
|
Beause everything is integrated, compiled code roughly means deployed code, they need strong, sound type system and many constructs are not allowed because the way it runs. I don't think there is a way to use threads for example because concurrency is handled above you. I think importing something (require/import) is referring to deployed code. They blur the line between saved and deployed code. You need to have dedicated language+runtime to support such a different model. I think their model is roughly - stateless functions only (context/state arrives as input), references (require/import) resolve to hash of ast they import; this hash is deployment "address" of function. In that sense all code is static/immutable/saved/deployed. Every time you import something, you're importing rpc wrapper, ie: 'foo = require('foo')` becomes `Foo = require(hashOf(astOf('foo')))`. I don't know if any of this is correct because there's no documentation, I don't know how they handle things like restarts or is it possible or not to have more than one deployed instances. |
|