X-Git-Url: https://ocean-lang.org/code/?p=ocean-D;a=blobdiff_plain;f=Ocean-types;h=4aa4e8976565620b460e5440a0580297d57d1173;hp=c25bd1be7ca16f3a9b418f97e7d938b8917e36f7;hb=83f7f2eae2f646ef67bb024ec50d1a3a4443de04;hpb=5b97b38c643628f0845dbfcf050f0b382b2f7ac3 diff --git a/Ocean-types b/Ocean-types index c25bd1b..4aa4e89 100644 --- a/Ocean-types +++ b/Ocean-types @@ -278,3 +278,23 @@ Questions: a(args) is Call(a, args) - need a new Binode type - Tuple. So I have to delay 'const' assessment to later too. + +---------- +Where do type definition go? +I don't think they go with statements, they belong separately. +I don't want the full separation of a "type" section like Pascal +So they probably go at the top level, equivalent to "program" - and before. +They start with "struct" or "enum" or "record" etc. + +So: what about constants? These are currently statements and so affect a scope in time. +But for declaring arrays in structs, or initial values of fields, we might want constants. +A constant could be within a struct, but only that it too limiting. I need module-wide +constants. +So I guess: + + const: + name ::= value + name ::= value + +or + const { name ::= value ; name ::= value }