Maybe meta-nodes should be seed packets, with a defined '' entrypoint
This can be covered (mostly) by having a let with a seed-reference to the sub-seed, and then the sub-seed uses var within. But that's confusing about ways to use it and which variables it expects to be set.
Perhaps some kind of special parameter on a seed that describes the environment it expects to be set? And then there can be some tooling to complain if those aren't set. (or it could just be convention, a utility seed of expect which takes an object, and then verifies that getting the var for each is not undefined.)
[x] Needs keys
[x] Needs let
[x] Needs throw (to throw an error)
[x] call
[x] function
[x] Test of call+ function
[x] function has defaults
[x] Make call.function be typed to only be allowed to be a seed function
[x] Make call.function throw if the seed reference is not to a function
[x] It should be that the arg list is explicitly expected to have arg: namespace (because var will have to have it so it's confusing)
[x] Test function fails if args is not set
[x] (Should call fail if the sub-object is not a function?)
[x] example-utility#memorize-items should take this
[x] example-utility#remove-numbers, remove-item-number should also take this
[x] CLI should render functions differently
[ ] CLI should have a mode to print the parameters of a function
[x] memorize-items should have memory be default
the convention is to pass parameters with an arg: prefix.
Ideally there'd be more than just convention, so there could be toolnig around it.
E.g. a call seed, which is basically a let-multi with a nested seed reference for block. And a function seed type that is basically an expect node but with a defined set of parameters and defaults. These don't do anything semantically except make it very clear to tooling what the intention is, allowing listing them as entrypoints, detecing missing parameters, etc.
function should have an array of arguments, prefixed with arg:, calle dargs. And defaults, which are a subset of args. And any that don't have defaults are required and will throw.
Maybe meta-nodes should be seed packets, with a defined '' entrypoint
This can be covered (mostly) by having a let with a seed-reference to the sub-seed, and then the sub-seed uses
var
within. But that's confusing about ways to use it and which variables it expects to be set.Perhaps some kind of special parameter on a seed that describes the environment it expects to be set? And then there can be some tooling to complain if those aren't set. (or it could just be convention, a utility seed of
expect
which takes an object, and then verifies that getting the var for each is not undefined.)keys
let
throw
(to throw an error)call
function
function
has defaultscall.function
be typed to only be allowed to be a seed functioncall.function
throw if the seed reference is not to a functionarg:
namespace (becausevar
will have to have it so it's confusing)call
fail if the sub-object is not afunction
?)the convention is to pass parameters with an
arg:
prefix.Ideally there'd be more than just convention, so there could be toolnig around it.
E.g. a
call
seed, which is basically alet-multi
with a nested seed reference for block. And afunction
seed type that is basically anexpect
node but with a defined set of parameters and defaults. These don't do anything semantically except make it very clear to tooling what the intention is, allowing listing them as entrypoints, detecing missing parameters, etc.function
should have an array of arguments, prefixed witharg:
, calle dargs. Anddefaults
, which are a subset of args. And any that don't have defaults are required and will throw.Should
call
require thearg:
namespace or not?