2 ms·
> The two aren’t mutually exclusive. The OP (of this thread) said, 'I saw some code importing dependencies like "import github.com/foo/bar."' I did not underst
by burntsushi 14y ago
> The two aren’t mutually exclusive.
The OP (of this thread) said, 'I saw some code importing dependencies like "import github.com/foo/bar."' I did not understand this as a criticism of the design choice of using URLs as imports, but rather, a statement about some Go projects doing something horrendously wrong.
Yes, one can think URLs as imports is both messy and idiomatic, but I do not feel that was central point of the OP. I suspect we will never get a clarification, though.
> If that URL goes down, is there a fallback mechanism?
I don't know what you mean. If the package is no longer available at the URL then it cannot be downloaded from that URL.
> For what it’s worth, I agree with oakaz’s sentiment that Go is “very imperative” and “not simple”. It is deliberately designed that way, with lots of syntax and types for representing (abstractly) the inherent complexities of its intended domain.
Go was not deliberately designed to be "not simple." In fact, it was deliberately designed to be simple. Simplicity's name is invoked again and again as a justification for including or not including changes to the language.