I gave it some more thought. If I ever want Hi to become anything more than a marginal language, I need state... So, for later: How to implement var? And at what level...? (And what to do with multicore, I explicitly want to avoid the need for locking....
Still, monadic programming in some sense is nothing more than programming w.r.t. to an encapsulated environment. There should be a manner to let that environment be mapped to a namespace. For example, each function when invoked keeps around a (fresh?) copy of the variables within that namespace?
Namespace bound variables seem too cumbersome to me, so all variables will just have the same life-time as a heap. Instantiate a new heap, and all variables are set to their initial value.
No comments:
Post a Comment