You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Feb 4, 2021. It is now read-only.
the way gogl is written right now, each graph implements a handful of interfaces. keeping track of this in client code is kinda crazy, and just about destroys the idea behind interfaces: to abstract implementation details away. when there are no unified interfaces, it effectively means that client code has to know which graph they're working with, and which interfaces they can switch it to. bleh.
the idiomatic Go answer is to export the struct, and have that be the primary thing that's passed around, except in cases where it a single, more specific interface is genuinely all that's needed. that may be the way to go (though it kinda runs counter to #1), and would definitely result in a giant explosion of godoc.
The text was updated successfully, but these errors were encountered:
ok, it's pretty clear that the best solution here is to export the structs. the only real argument against that is 'noise' in the godoc; all the other arguments are in favor of it.
the way gogl is written right now, each graph implements a handful of interfaces. keeping track of this in client code is kinda crazy, and just about destroys the idea behind interfaces: to abstract implementation details away. when there are no unified interfaces, it effectively means that client code has to know which graph they're working with, and which interfaces they can switch it to. bleh.
the idiomatic Go answer is to export the struct, and have that be the primary thing that's passed around, except in cases where it a single, more specific interface is genuinely all that's needed. that may be the way to go (though it kinda runs counter to #1), and would definitely result in a giant explosion of godoc.
The text was updated successfully, but these errors were encountered: