quil-lang / quilc

The optimizing Quil compiler.
Apache License 2.0
457 stars 72 forks source link

Add support for clos-encounters #919

Closed macrologist closed 5 months ago

macrologist commented 5 months ago

Fixes #917 in conjunction with a similar PR to QVM

This PR relies on a new dependency to quil-lang software called clos-encounters, which implements common OOP patterns presently in use in quilc and qvm. CLOS-ENCOUNTERS is meant to be a drop-in replacement for the tfeb abstract classes and singleton classes libraries that we have been using.

The tfeb libraries utilized lazy-loading of a dependency (closer-mop) in a manner that broke our build process. Because these OOP patterns are so easy to implement, we've simply done so here rather than making a PR tfeb's repo.