3 ms·
It is interesting to me that this feature has evoked such passion and feeling. To me it is a few extra characters and easily managed at the top of a file. It ge
by bitexploder 10y ago
It is interesting to me that this feature has evoked such passion and feeling. To me it is a few extra characters and easily managed at the top of a file. It generally will take at least one line of code to import some other package or library. It isn't as terse as say C or C++ nor is it as flexible as Python's import system. Of all the things that bother me about a particular language, this just never bubbled to the surface for me.
(Vendoring and package management are different issues)
- eternalban 10y agoIt is not a matter of just a few characters. It is a conflation of logical identity (URI) with location (URL). Engineering 101. https://github.com/coreos/etcd/blob/master/lease/leasehttp/http.go#L26 https://github.com/coreos/etcd/blob/master/lease/leasehttp/h... What could possibly justify having to use that import line in a sibling package of the same code?
- Jare 10y agoIf you fork a go package with subfolders, you will be in for some trouble. Your fork is still importing the original subpackages, because they are referenced by their absolute (original) address. You don't want to rename the imports in the entire fork because you still want to merge/pull request with the original. So your fork needs to live in a folder that uses the original name, not your fork's name (that local repo will have two remotes, the original and yours). This is a pretty annoying and error prone disconnect, especially for people wanting to use your fork; they need to do the same type of workarounds.