Barry Smith <bsmith at mcs.anl.gov> writes: > Seems inconsistent to only handle the cast automatically for > some. We should do it all or nothing. That is be C++ish and let the > user always pass a subclass where the class is expected or be C ish > and always require the cast.
Unfortunately, there is no way to allow implicit conversion for subclasses without implicitly converting everything. The explicit cast is visually jarring enough to make it obvious at the call site that that argument must be a PetscObject. I'm pretty indifferent about changing it.
