-
Notifications
You must be signed in to change notification settings - Fork 19
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
API Overhaul #87
Comments
would be good to have a document specifying a guidelines for all API's to conform to, to enforce consistency as much as possible. Here are a few design choices that need to be done:
vs
advantage of latter: self documenting, easier to extend, can use default params for any subset of the fields, easier to pass around across function calls. Maybe it's overkill in this particular example, but useful in general |
You might like this DIP dlang/DIPs#71 - though of course at this point it's unclear whether it will be accepted. |
Ping @timotheecour @9il @nervecenter On @timotheecour's suggestion, I've put these points into one (bit better formulated) document on the wiki: You'll notice the table with the volonteer's username to handle specified issue in this task. Currenly I've self assigned myself on each target, but feel free to deassign me if you'd like to contribute to any of these tasks. :) Also, feel free to add to the document! - I've added only what I know about this, and half of the bullet points in the docs do not come from me, so you're more then welcome to edit the post. (I've temporarily opened wiki edits for everyone) |
Why is a hybrid design bad? I spent some time trying to understand DCV's API in color.d (e.g. rgb2gray) and came away seeing the advantages of returning a Slice and also accepting a pre-allocated buffer:
I see in #65 that there is a desire to make DCV's API compatible with being called from languages other than D. Is that the reason a hybrid design is less desirable? Or am I missing that there is a better way to control memory usage outside of pre-allocated buffers? |
We have talked before how this project bears a lot of design mistakes in the API. Now that we've joined it with libmir, I'd strongly suggest we join forces and redesign the API, before going into development of new features.
Some of examples we have talked about before:
nothrow @nogc
library without druntime - I believe we have agreed that ideally low level API should not use druntime?@9il if you're interested, I'd be willing to do the heavy lifting on this task, but I'd really like you to follow through each change, and not let me repeat some of those mistakes. What do you think? Of course, anyone else willing to join revision board is more than welcome!
And of course, everyone interested in project is welcome to share his/her opinion on the matter.
The text was updated successfully, but these errors were encountered: