-
Notifications
You must be signed in to change notification settings - Fork 28
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
Allow local versions of database #243
Comments
This was in part discussed in #134. You can take a look there for a bit of background. I'm not sure how this should work. Suppose that package {A} and package {B} depends on {units}. Following your example, suppose that {A} wants "pt" to be "pints" and {B} wants "pt" to be "points". Then the user wants to use both {A} and {B}. What should happen if the user wants to define 3 "pt"? What if the user takes any unit produced in {A} and uses it in a method of {B}? |
Interesting discussion. I think there is a distinction between packages using units internally, and exposing them to the user. For example, suppose I am a radiologist. I load a package that uses The radiology package, which accepts units as inputs from the user, could either use its own copy, or could use the global database as now. Using the global database means the user can easily add new definitions, which is useful. The corresponding risk is that definitions can be silently overridden if another package is using the same database. |
I think the design of |
I also thougth about multiple units systems in the past, but nowadays I tend to agree with @edzer. If a package just wants to internally deal with some specific non-standard units (i.e., inches, points, lines..., as {grid} does), then {units} is of no benefit. If instead you want to export such functionality and make it available through {units} to the user and other packages, then as soon as you have your own units, everything is messed up, with or without multiple databases. |
If I want to use - e.g. - "pt" for points, not pints, I can do that with
install...
functions. But now suppose a package does that, but another package wants to use "pt" for pints. I don't think at present that will work. It would be nice if different namespaces could have their own versions of the udunits database.The text was updated successfully, but these errors were encountered: