+
+ When do I differentiate between compile-time constants and run-time values?
+ When declaring an array, do I require the size to be constant?
+ In a struct I do ... at time of declaration I calculate the size.
+ For foo:[sqr(a)]int
+ I do that too - and it is at run-time.
+ So during parsing, I need to describe the array with a member-type and executable size.
+ When that is evaluated, a type is created.
+ So we really need an executable which returns a type.
+ But ... we need to know the type when doing type analysis. So while variable size
+ is OK, the compiler needs to know what it is. Maybe the size needs to be a constant, as in
+ a names assiged with "size ::= 4*5". This gives the compiler some chance of comparing
+ types of array - and doing range checking on indexes.
+
+ We currently call var_init to set the type of a variable during type
+ analysis - which makes sense.
+ But for an array we don't have the final type until run-time. So we need an
+ intermediate type.
+ So (for now) the size of an array is either a NUMBER or an IDENTIFIER which must be a
+ constant var.
+ I need a point where the type is instantiated - where the variable is evaluated
+ and the size is set. I guess this happens when the 'struct var' is evaluated...
+ no, when a Declare binode is evaluated.
+
+ What happens if I have
+ a:[foo]number = thing
+ I guess the type analysis needs to afirm that thing has the correct type,
+ then a doesn't need to be initialized.
+
+ If I find
+ a[4] = "hello"
+ and 'a' hasn't been declared .... obviously an error.
+
+ When/what/how.
+ For field access, I need to know the type of the variable.
+ But I can delay the look up until type analysis.
+ So a[4] is Index(a, 4) - a binode
+ a.foo is Field(a, "foo") - need a new exec type - Fieldname
+ a(args) is Call(a, args) - need a new Binode type - Tuple.
+
+So I have to delay 'const' assessment to later too.