[RFC] Extend and export CCL::CONDITIONAL-STORE #52
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I made use of this hidden gem to implement CAS based queues for Erlangen (Erlangen extends CCL a bit to support this code). It has some rough edges, but I feel like a polished
conditional-storewould make a fine addition to the CCL API. What do you think?So far I have
conditional-storeon a slot with a type specified would fail, because it could not handle the emittedtheforms)carandcdrplaces that call out toccl::%rplaca-conditionalandccl::%rplacd-conditionalrespectivelyconditional-storeto the list of symbols exported from the CCL package and wrote some documentation forconditional-storeSome issues remain:
with-slotsdue to the type uncertainty at run-time. (i.e. we know the slot name, but not the type of the structure objectI don’t fully understand why/how this macro works on the types of places it does, and not on others. This is mainly due to my lack of understanding how slot accesses are implemented. Any hints to what I have to watch out for when dealing with places is appreciated. For instance this is the first time I have used
&environment, and suddenly there are so many questions. Like, who deals with(the ...)forms, what do I break when I mess with these during macro expansion?Example usage: