-
Notifications
You must be signed in to change notification settings - Fork 4
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
Topics currently implicitly solved #5
Comments
On getter/setter. Yes. The use of descriptors is on purpose, intended to support accessor properties by copying the descriptors, rather than calling the getter. |
On self mutability: It is a concern. In light of your question, I went back and looked, and it is in fact a bit worse than I thought. The layerFuns get the finalObject in a non-frozen form and cannot be prevented from mucking it up. The intent is that non-interference policy be expressed by the combineFunction, but it really can't do much about that. Altogether, I think it is fine, but should probably worry about it more. Nevertheless, you should proceed. |
On final object mutability: I originally wrote this without any non-test use of
|
These will bring this code closer to being valid Jessie. However, neither before or after this PR can be valid Jessie by current Jessie rules. For the before, because Jessie has no generators. For the after, because Although we should still keep this code as close to being in Jessie as we can, I think the appropriate level of ambition is that it be in SES but made available to Jessie, in the same way we expect to keep |
I see a possible solution: |
Sounds good, keeping the issue open to remember to add automated tests for this |
@erights I see another concer which is currently not explciitely covered in test cases: In case of naming conflicts, class-based cake favors the top-most layer. However, the case for trait-base cake is less clear to me. When there is a conflict, should |
The intent of this simple |
If there is an intention to start using layer-cake i feel a couple of topics need to be made explicit (at least in terms of intention being documented in the open and likely a couple of automated tests)
getter/setters
Are these meant to be composed?
Currently they are by the use of Object.getOwnPropertyDescriptors, but there are no automated tests on this topic, so it's not clear whether it's intentional and meant to stay
self mutability during object construction
In the PR, the final object is passed to
layerFun
as is and is mutableIt's not clear to me how much this is expected or a concern from a security point of view
final object mutability
The object returned from
makeClassCake
andmakeTraitCake
is mutable (at least in the sense of property addition)Again, it's not clear to me whether this is intentional
However, i'm not sure it's necessarily a choice this lib should be making. Maybe this choice should be left to the consumer
The text was updated successfully, but these errors were encountered: