-
Notifications
You must be signed in to change notification settings - Fork 6
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
Export policy #6
Comments
I think the main motivation behind the decision to export something in Julia is two-fold:
I haven't found that traditional OO concerns (e.g. safety via a mutation permissions scheme built on top of message passing) are as relevant in Julia, since a type holding "private" state is fairly rare. Even when a type DOES use private state, it's generally handled at the constructor level, as well as by a refusal to provide accessor functions to the private information. In general, the deciding factor for exporting abstract types should be "Do we want the user to be able to dispatch on this type without importing it?". I can understand not exporting most abstract types, since I assume that most of them will rarely be used outside of somebody actually writing packages on top of QuBase. The exceptions here are subtypes of I'm of the opinion that it's okay for |
How about putting the abstract types and the interface functions into a submodule ( Regarding |
Which functions are you referring to? As for abstract types, I'd rather just not export them then move them into a submodule. But I still don't see the downside of exporting types, other than having to document the type tree (which should probably be done as a matter of dev documentation anyway).
I think it's reasonable to not to export functionality until somebody is ready to write documentation for it. Until we start documenting things, I suppose what we export will serve as a guide for the technical debt we'll have to pay off with the first wave of documentation. |
Uh, nothing in particular. See below for a maybe clearer definition.
Maybe I am just stuck in old habits, but I would prefer to somehow separate "user interface" and "developer interface". Of course it doesn't harm if you export the (abstract) types, but OTOH as as "normal user" you are probably not using them anyways. Maybe I am making this too complicated.
Yes, that is one aspect. But if you think ahead, we will likely have a wild mix of functions which have a matrix counterpart and functions without one. You can document this, but if there is no guiding principle behind this it will not be intuitive. So either we say that we always want to have a matrix function (if it makes sense) - or in other words always provide the |
This makes sense. After thinking on it some more, I don't think it would be productive to put effort into supporting/documenting the Array counterparts to QuArray functions, at least until we have a more solid feature set. I'll remove those exports for now and close up this issue. |
As briefly discussed in #5 we should decide on a policy for
export
s. Since exports in some sense also define the package API, this might be tricky to decide now. AFAICT there are several options:QuArray
andFiniteBasis
and the related functions.raisematrix
etc).The text was updated successfully, but these errors were encountered: