starlark
starlark copied to clipboard
Introduce primitive types
Introduce primitive types. Also preliminary introduce collection types, so that the spec won't seem half done.
Move the strings returned by type() function to its section. type function returns strings that are different from type annotations. In my opinion it's best to keep it as it at the moment, call it legacy, but wait with a better replacement for now.
With each new type introduce I also would like to add signatures to functions in standard library. Unfortunately only hash is completely typed with primitive types. (Also some overloads of operators, but not all of them. If we had object we'd also have also signature for: bool, hasattr, repr, str and type functions).