Comments (3)
Nice work! I'm glad to see this in Emacs' core. I just pulled in the
latest commits to take a look at it. The entire interface is
make-finalizer, correct? What's the proper way to feature test for it? I
don't see a featurep symbol for it, so is it just "(fboundp
'make-finalizer)"?
If the feature is present, I'll not use post-gc-hook and not enforce the
no-circularity constraint. Instead I'll put the target object into a
single, global ":weakness value" hash table with a make-finalizer object
as the key, set to call the user-provided function passed via closure.
Any caveats on how these new # objects hash? It's not every
day Emacs gets a new primitive type, after all! A casual test with
sxhash suggests they'll distribute to different buckets well enough.
from elisp-finalize.
On 03/02/2015 06:07 PM, Christopher Wellons wrote:
Nice work! I'm glad to see this in Emacs' core. I just pulled in the
latest commits to take a look at it. The entire interface is
make-finalizer, correct? What's the proper way to feature test for it? I
don't see a featurep symbol for it, so is it just "(fboundp
'make-finalizer)"?
Yep.
If the feature is present, I'll not use post-gc-hook and not enforce the
no-circularity constraint. Instead I'll put the target object into a
single, global ":weakness value" hash table with a make-finalizer object
as the key, set to call the user-provided function passed via closure.
That sounds good to me. Everything should happen automatically. For the
EIEIO mixin, you might want to just make the finalizer object an
embedded field instead of indirecting through the global hash table.
Any caveats on how these new # objects hash? It's not every
day Emacs gets a new primitive type, after all! A casual test with
sxhash suggests they'll distribute to different buckets well enough.
They're hashed by their locations in memory, which should be good enough.
from elisp-finalize.
Just a little ping to remind you of this suggestion, now that Emacs v25.1 has been released.
(If you don't intend to work on this any time soon, then please consider creating a new commit 1.0.1
. Sure there is only one rather minor commit since 1.0.0
, but it hasn't made it into a release in three years and told me that it feels a bit sad about being left out.)
from elisp-finalize.
Related Issues (1)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from elisp-finalize.