8,634 karma · joined Jun 23, 2011 (15y ago) · 7,679 submissions
comment 2y ago · link · parent
By your logic some nebulous package in a random GitHub repository that happens to satisfy an interface is also another implementation, but you would have to be completely out to lunch to think that fits with the topic of discussion.
comment 2y ago · link · parent
I'm still not clear on where the idea that this is a "best practice" is coming from. Is there some context I am missing?
Aside from the editorialized title, all I can find is an assertion of "following best practices", which does not even imply that it is trying to establish best practices (of any sort, let alone around efficiency or complexity), merely that the author tried to follow some best practices established elsewhere. It is understood that to follow opens the possibility of veering off course, so unless the beginner is also a beginner with spoken language, it would not be taken to mean that this demonstrates best practices.
comment 2y ago · link · parent
Not in any reusable way. Take a look at mockgen and testify: All they do is provide a mechanism to push implementation into being defined at runtime by user code. So, if they, or something like it, is in use the implementation is still necessarily there for all to see.
> Also, the original author of the function that consumed the apparently unnecessary interface type may have intended to test it
Okay, sure, but this is exactly what the commenter replied to was talking about initially. What is a repetition of what he said meant to convey?
> That means the discussion may be broader than just what one person contributes to it.
Hence why we're asking where the relevance is. There very well may be something broader to consider here, but what that is remains unclear. Mocking in and of itself is not in any way interesting. Especially when you could say all the very same things about stubs, spies, fakes, etc. yet nobody is talking about those, and for good reason.
> If this offends you
For what logical reason would an internet comment offend?
comment 2y ago · link · parent
Seemingly the almost verbatim repetition, yet presented in a combative form is because you don't have familiarity with programming, and thus can only respond with canned responses that you picked up elsewhere. If you do have familiarity, let's apply it.
So, do you actually want to discuss the topic at hand, or are you here just for a silly fake internet argument?
comment 2y ago · link · parent
What suggests that the "best practice" is sliced down the efficiency lane? The intent could be to "best" demonstrate how to structure a collection of algorithms and data structures into packages, for example.
comment 2y ago · link · parent
Well, yes. While perhaps some metadata is lost, the content that is worth fighting for is captured in both cases. Practically speaking, there is no difference between the original source, an ISO rip, and an MKV rip. At least to the untrained eye, they are in every way equivalent. They both are redistribution, indeed.
That is not the case for SaaS in question. What you download during use can in no way be reconstructed into its original form. You can't use the software for a while and then, from what you've collected, start running the software on your local machine. The artifacts of use are very different from the software itself. To stick with your analogy, watching a movie on Netflix does not give you a copy of their server software. Distribution has not occurred.
comment 2y ago · link · parent
comment 2y ago · link · parent
Well, why not?
"Source" has long referred to available information. In fact, you probably won't have to read HN long before you encounter a "source plz"-type meme, intended to mean something akin to: "Please point me to the available information that supports your claim."
"Open" has long referred to available information that is accessible to users. "Open source[code]" uses "open" in the same way.
PAT works too but I'm not sure it communicates anything meaningfully different. As far as I can tell, they are trying to communicate the very same thing. Is your reaction, perhaps, because you are accustomed to "open source" being used in the software sense?
> Do we refer to street dogs as open source dogs?
Dogs haven't typically been seen as information, so, for all practical purposes, probably not. But if we want to change that, sure, why not? Language doesn't have feelings. It doesn't care.
comment 2y ago · link · parent
I say in theory, because as demonstrated by the sibling comment, there apparently isn't much programming expertise around here. At least it was fascinating to see how a mind can go haywire when there isn't a canned response to give.
comment 2y ago · link · parent
Mocks, by definition, are always a supplemental implementation – in other words, where there is two or more implementations. What you failed to make clear is why you would bring up mocks at all. Where is the relevance in a discussion about single implementations the other commenter has observed? I wondered if you had missed (twice!) the "one implementation" part, but it seems you deny that, making this ordeal even stranger.
comment 2y ago · link · parent
That is clearly not the same thing. Why don't you do the exact same thing? I mean, other than the monopolistic efforts holding you back.
(I recognize that you are trying to bring your own monopolistic definition to the table, and while I'm sure it has merit as a better definition, I fail to understand what value you think there is in trying to change the subject? Why not just stick to the topic in progress like everyone else, even if you don't love everything about it? The rest of us probably don't love it either, but that's not a good reason to toss the ball to the side in an effort to disrupt play because it isn't the brand of ball you have a preference for.)
comment 2y ago · link · parent
So, while a fun distraction, we're right back to you thinking that money in someone else's hand is better than money in your own. What is your rational? Conventional wisdom says that there is leverage in increased cashflow. Why is the conventional wisdom wrong?
comment 2y ago · link · parent
Is suspect you will soon find a monopoly, though, and that you’re merely confusing some external interpretations with what is defined within the context of this particular.
comment 2y ago · link · parent
Right, as we already established, but which is only incredibly narrow support within the features in question. While you can find safety within the scope of enums and enums alone, it blows up as soon as you want the same safety applied to anything else. No popular language comes close to completing these features, doing it half-assed at most. We went over this several times now. Typescript goes a little further than most popular languages, but even it doesn't go very far, leaving all kinds of gaps where the type system does not provide the aforementioned safety.
You clearly know how to read, by your own admission, so why are you flailing around like one of those wacky blow up men at the used car lot? Are you just not familiar with programming?
comment 2y ago · link · parent
Sure, which it can do because of the monopolistic position it has entrenched itself with. If that were cleaned up, it would no longer be in a position to do that. But the other commenter doesn't agree with you. He says that is an entirely different problem.
comment 2y ago · link · parent
Perhaps you are thinking of strip clubs?
comment 2y ago · link · parent
Sure. Why not? Typically society would only be concerned with the servitude becoming involuntary. Thus the right to be enslaved would be expected to also come the right to end enslavement at will. That said, in most jurisdictions marriage dissolution is happy to uphold involuntary servitude so we're not entirely consistent here.
> Suppose a guy wants to sell his organs?
Likewise, society might take issue with it because of its once and done nature. Decide that selling your organs was a bad idea and don't want to do it anymore? Too bad. You are already dead. However, relatedly, things like the sale of blood often is legally accepted as you can stop providing blood at any time if you find the association is no longer working for you.
Aside from the monopolistic considerations, the 30% offer to Apple would normally be acceptable to society because, like blood, one can stop offering it in the future should they no longer find it to be desirable. If it were a contract that states that you will pay 30% and on all future transactions for the rest of your life, even if you stop liking the idea, then society would undoubtedly take issue with it. But that in no way has any relationship to what is being talked about here.
Now, the monopolistic considerations are not typically accepted by society, but, indeed, we have gotten pretty lazy in doing anything about it.
comment 2y ago · link · parent
Need to write, say, a network service? Go can no doubt give just about anything else a productivity run for their money. Need to solve a machine learning problem? ... Good luck. It can be done, of course, but you're quite likely in for a whole lot of extra work not needed in other ecosystems, destroying any semblance of productivity.
In other words, the comment is a thinly veiled "use the right tool for the job".
comment 2y ago · link · parent
It seems it only becomes a problem when there is external pressure that where accepting the giving of giving 30% to Apple is seen as the best of a bad situation. But that's what anti-monopolistic efforts are supposed to avoid.
comment 2y ago · link · parent
If you give to a single individual on the street, it would typically be considered a gift. If you gave to a collective on the street, then it would typical be considered a donation.
Of course, humans are at their best when not normal. If you want to call giving to an individual a donation, go nuts. Hell, if you want to call it the moon, even better.