[Lldb-commits] [PATCH] D29510: Remove LIBLLDB_LOG_VERBOSE category
Zachary Turner via lldb-commits
lldb-commits at lists.llvm.org
Fri Feb 3 17:40:51 PST 2017
Yes, a centralized list would be nice
On Fri, Feb 3, 2017 at 5:27 PM Jim Ingham <jingham at apple.com> wrote:
> That doesn't help me if I don't know that Format takes formatters and that
> various lldb objects take formatters and here are all the formatters we
> have. And it would be kinder to have the list of available formatters
> centralized somewhere so folks don't have to go scouring through the code
> to see what's there.
>
> Jim
>
> > On Feb 3, 2017, at 4:49 PM, Zachary Turner <zturner at google.com> wrote:
> >
> > Right, one of the suggestions I mentioned first was to have comments in
> the headers that mention the ability to format the class, or to have the
> formatters defined in the same header file as the object. So you look at
> the definition of FileSpec, and you learn about the formatter for FileSpec.
> >
> > On Fri, Feb 3, 2017 at 4:48 PM Jim Ingham <jingham at apple.com> wrote:
> > Not to be snarky, but that's why we put comments in headers...
> >
> > Jim
> >
> > > On Feb 3, 2017, at 4:47 PM, Zachary Turner via Phabricator <
> reviews at reviews.llvm.org> wrote:
> > >
> > > zturner added a comment.
> > >
> > > I guess the same way you would know how to use any part of a library
> or API. The first time you've ever used an API, you don't know how it
> works, so you don't know it's capabilities. So you fiddle around, read the
> source code, trudge through some compiler errors, then you learned some
> more about how it works. Probably someone using this would try to print
> something, and get a compiler error that triggers a helpful static_assert
> which says "missing format provider for type = Foo!". That gives them the
> next piece of the puzzle they need to understand a little bit more. Or
> they look at the code for `formatv` to see how it works and see all the
> documentation.
> > >
> > > It sounds analogous to asking "how does someone new to the codebase
> know that commands in LLDB are implemented by something which inherits from
> CommandObject?". Of course you don't if you're brand new, but once you
> figure it out you don't really have to spend much time thinking about it
> again.
> > >
> > >
> > > https://reviews.llvm.org/D29510
> > >
> > >
> > >
> >
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20170204/f2e128c0/attachment.html>
More information about the lldb-commits
mailing list