-
Notifications
You must be signed in to change notification settings - Fork 9
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
Objective-C binding organization #26
Comments
I think we could use |
This might raise some eyebrows. In essence I think it's reasonable to still follow Objective-C/OOP conventions in the stubs. So if there's something that you want to get from an instance or you want an instance to do, you call a method on it. |
@rauanmayemir great idea 👍. |
The only thing I feel uneasy about is how to umbrella bindings under the |
The top level package (i.e. |
@rauanmayemir if we think the rules are set here we should document it in some contributing document and close the issue. |
We need an imperative component example and couple more complex protocols to flesh out complete-ish bindings guide. |
This issue is about binding organization, not a binding guide so I think we're fine here 😄. We can add more granular issues for other stuff or we'll never close this one. |
Some interesting links: https://arxiv.org/pdf/1812.04905.pdf |
This is a (possibly incomplete) list of rules that I think we should apply to our bindings. All rules should lead to easier navigation and to minimizing the binding surface. Rules which don't serve this purpose... well should not be here. If there's a way to make something better organised but more verbose - I'm all for it but there has to be an automated way to verify if we follow the rule!
.h
files unless we need to expose a symbol to other callers in the C universeml_
_stubs.(h|c)
. They are in the stubs directory anyway."Brisk"
prefix..c
file- "Brisk" prefix
.stub
files instubs
directory and OCaml bindings inbindings
directoryBriskCocoa.c
.Cocoa_helpers_stubs.c
. Searching by file name gets confusing. Even if a file is supposed to contain just one binding/function, it's better to name it properly. LikeBriskColor.h
Brisk_macos
module (if needed).Objective-C
over C. If a function is not exposed to OCaml it's preferable to put it in a category or a Class itself (if it's an internal class to Brisk).The text was updated successfully, but these errors were encountered: