-
Notifications
You must be signed in to change notification settings - Fork 1
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
Clean API functions names #25
Comments
I'd suggest to stay as close as possible to definitions in the Emacs Lisp manual and the naming of Emacs functions.
|
Ok, so
Ok.
I don't like using float for double but I agree it's more consistent. What do you think of using |
What is wrong with "user ptr"? |
Nothing in particular, I'm just not overly fond of function names like |
|
It still seems better to extend Lisp_Save_Value to take an optional finalizer and avoid adding a second opaque pointer type to Emacs. You can just make it possible for the first slot to be a finalizer, there are still SAVE_* bits left. |
That would also work, but I think it wouldn't change the interface or naming. (There is currently no way to create Save_Values from modules.) |
I think user pointer are fundamentally different than Save_Values and as such deserve a type. We might need extra fields in the future that save values cannot accomodate for. |
I've pushed a commit that updated API functions & other denominations according to this discussion. I'm keeping this open in case we still want to change some names. If you are OK with this please say so, so I can close the issue. @tromey you probably need to update your ffi module. |
I don't want to keep bugging you about the type thing, so I promise I won't bring it up again. But anyway my view is that types are important for user code (or I suppose the platform) to differentiate between different kinds of objects. But, in this case, both user-pointers and save-values are just opaque types that are essentially useless to elisp. That is why, in my view, it makes sense to unify them. |
Save_Value is an internal type that is not supposed to be exposed to users. User-pointer are can be exposed. We could add a symbol or some kind of id as user-ptr sub-types (like we had previously with module_id...). |
Chose and keep a consistent style for API function name. Let's do this while we can (ie before release).
The text was updated successfully, but these errors were encountered: