|
|
|
|
|
by krapp
4179 days ago
|
|
I suppose you would have to draw a in the sand somewhere as far as types go, and it depends on the language. I know TOML allows dates as a type, which seems useful, but then you could just stick to ints and use Unix timestamps, I guess it depends on how strict you want to be. But to me, a primitive type at least can't evaluate to anything other than itself, and also doesn't include pointers or references. In Lisp terms I guess it would be an atom? Likely at least numeric values, booleans (in whatever form), chars and some kind of tainted string (tainted in that it can't be evaluated as code, even if you try to do so.) >and what's a "simple structure" (can I make a circular list?) A simple structure as I define it is a collection that contains primitive types, so not, like, an array of function pointers or anything. Array, struct, tuple, map, etc. I think a circular list as a type might be interesting and definitely useful (does it exist anywhere?) If I ever design a programming language that's one of the things I want to add. |
|