It's unfair if they're normal employees, but fine if they're contractors/have their own company.
When they're spending all their working hours on one topic they're taking a huge personal sacrifice which is invisible to their employer while at the same time raising the expectations towards their colleagues. If there's for example two such maniacs in a team, the rest can say goodbye to promotions and raises even if they're actually just as good but don't sacrifice their life at the altar of programming.