Skip to content
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

added nim-ovr #173

Closed
wants to merge 1 commit into from
Closed

added nim-ovr #173

wants to merge 1 commit into from

Conversation

bluenote10
Copy link
Contributor

No description provided.

@dom96
Copy link
Contributor

dom96 commented May 25, 2015

Have you seen this? https://github.com/nimious/io-oculus

By the way, any chance I could ask you to rename your package(s) to not contain dashes? That is something that Nimble may have to enforce sooner rather than later. By convention, the name of your package's module should be the same as the name of the package.

@bluenote10
Copy link
Contributor Author

Oh nice, last time I searched for bindings I couldn't find anything (maybe because I did not yet fully understand nimble). Well, was a good exercise anyway.

Sure, I'll rename the packages. My worry was simply that a too short name may lead to conflicts like in case of ovr. But isn't it a too dangerous to just name a package "heap"? I guess it is pretty likely that there will be several packages which should have the same name. I guess I'm just missing the package/namespace functionality of C++/Java/Scala here. Any other ideas how to "prefix" modules? Should I put the source in a subdirectory "bluenote" so that it becomes import bluenote/ovr?

@dom96
Copy link
Contributor

dom96 commented May 25, 2015

You don't need to namespace them. ovr is fine as long as there isn't already a package by that name.

@bluenote10
Copy link
Contributor Author

The import for io-oculus is import ovr, so this will already cause problems. I guess it is even more dangerous with something like heap: Doesn't this mean that users cannot have their own heap.nim in their sources when the heap package is installed? Even if local sources have precedence over nimble packages this feels very dangerous.

@dom96
Copy link
Contributor

dom96 commented May 25, 2015

The io-oculus package unfortunately breaks the convention too. I haven't yet made a decision but I think it's likely that Nimble will reject packages which break this convention because of issues like these.

@dom96
Copy link
Contributor

dom96 commented May 25, 2015

I guess it is even more dangerous with something like heap: Doesn't this mean that users cannot have their own heap.nim in their sources when the heap package is installed? Even if local sources have precedence over nimble packages this feels very dangerous.

That is true. Unfortunately I think that might require an addition to Nim to disambiguate these cases.

@bluenote10
Copy link
Contributor Author

What if you would just require that there are no sources in the top-level directory? This would require to put the source in a subdirectory corresponding to e.g. the orginazation name and all imports would read import <organization>/<package>.

... but maybe this is not the place for this discussion. For the time being I'll just try to come up with some awkward names to avoid conflicts.

@bluenote10
Copy link
Contributor Author

I have fixed the names, but I think I'll just open a new PR...

@bluenote10 bluenote10 closed this Jun 1, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants