← Back to team overview

dolfin team mailing list archive

Re: Naming of functions that print stuff

 

On Wed, Oct 19, 2011 at 12:51:31PM -0700, Johan Hake wrote:
> On Wednesday October 19 2011 12:29:51 Anders Logg wrote:
> > What should we name functions that print stuff? We now have
> >
> >   list_linear_solver_methods()
> >   list_lu_solver_methods()
> >   list_krylov_solver_methods()
> >   list_krylov_solver_preconditioners()
> >   list_timings()
>
> I think we should add
>
>     list_linear_algebra_backends()

Good suggestion.

> > Is list_foo good? Other options are
> >
> >   print_foo()    # Natural, but perhaps a bit vulgar?
> >   info_foo()     # Goes with the info() function
> >   display_foo()  # I don't like this one
>
> Not a big deal, but I like either one of the later rather than list_foo.
>
> What do you have against display or disp?

It sounds more like graphics than text. And we just to have foo.disp()
in DOLFIN before we had info(foo), so that might also be a reason why
I don't like it.

> Is the connection to info in info_foo confusing rather than clarifying? If we
> go with this one, we should probably use the log system (info) to actualy
> display the info.

We do use the log system (dolfin::cout).

More comments? Let's settle on something "everyone" likes so we can
get it into the book and 1.0.

--
Anders


Follow ups

References