-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Transparent value objects can't carry custom guards #228
Comments
I know I am without context beyond my E understanding. But from the title this sounds like something I should understand. Could you explain, starting from nothing but knowledge of E and very little understanding of Monte? cc @dckc |
My vague understanding is: we have makeTransparentKit (sp?) that gives you pieces for building transparent objects. The claim here is that when you build them, they can't be DeepFrozen... Presumably because of some gordian knot that's tied with promises. |
to wit, these def / bind pairs turn into promises:
https://github.com/monte-language/typhon/blob/master/mast/prelude/transparent.mt#L34-L35 |
I will go in reverse. In fd7a9ba, I wanted to have a Our current implementation of Our implementation does allow for I suspect @washort or @kpreid may have specific memories of why the implementation does this. There's an obvious complication to simply adding guards onto the maker; it breaks the round-trip properties that |
I haven't been following your work, but I can comment on what I remember of my thoughts at the time I was working on E-on-CL. A guard is essentially an arbitrary function, so if a maker has a guard in its parameters that modifies the value in a non-idempotent fashion, then it can't be used for The natural solution here is that guards may be guaranteed idempotent (which could be checked by an auditor of the guard's code / rubberstamped for primitive guards), and a maker of For example, a guard whose code, as observed by an
must be idempotent since (a) it only returns objects approved by a specific auditor and (b) if given such an object, always returns it and not some other. |
Yet another stumbling block on the road to data classes.
The text was updated successfully, but these errors were encountered: