What if both of them put real effort (money) into research and arrived at similar/same place? Should it be dismissed as well? Or is there something as joint patent?
I think in that case, the answer is "too bad, so sad". The patent system shouldn't guarantee some kind of monetary reward. If it does, it sets up the wrong incentives.
Independent invention should be a sign that the idea isn't worth patenting, that it was "in the air" at the time.
The comment to which I responded seemed to take the view that spending a bunch of money on discovering or inventing something should more-or-less be automatically rewarded with at least a portion of the "intellectual property" rights. That's the concept I wanted to rebut.
I don't have facts at hand, but I imagine that like any other thing (starting a business, writing a book, creating an App) 99.9% of patents result in no monetary gain whatsoever. But if we're going to go all in on the property aspects of patents, then I think that morally and ethically, we have to give an independent inventor a share of the property. Anything else just looks arbitrary, and leads to disrespect of patents, "intellectual property" and The Law in general.
If two people invented the same thing together (or, more commonly, one person invents feature A, and another invents feature B, where both feature A and feature B are part of one invention), then they are joint inventors (and without an assignment or an obligation to assign, they are both joint owners). On the other hand, if two people invent the same thing separately (e.g., similar research goals at two competing pharmaceutical companies), then the first to file gets the application.
It still must be an enabling disclosure, though. That is, it has to teach the public how to make and use the invention.