User:Colby Russell/Static initializers: Difference between revisions

module state
(state + link to User:Colby Russell/JS bridge for aliens)
(module state)
Line 48:
Of these choices, I like (3) the least, because it also compromises our principle of "you can keep all the rules in your head, and whatever the compiler does you could do yourself by hand if you wanted to" and it leads to code that isn't [[top-down]]. And I don't especially look forward to having to implement a satisfiability solver even in the compiler.
 
'''2020 July 26''': Another way of describing state, especially to [[User:Colby Russell/JS bridge|alien]] programmers: the runtime (more specifically, the thread[XXX] of execution kicked off by `main` [or what-have-you]), combined with the filesystem is your state, and you don't have arbitrary write access to the filesystem for state persistence, so it's best to keep this in mind while designing your programs. Unlike JS or, say, Modula, there is no module state, because module state implies top-level state (and indeed, the entire notion of module state is just another way to avoid saying "global state" by trying to cast it in a way that people won't notice), and top-level state is prohibited by the declarative nature of the t-block file format.