[TUHS] early cc variable and function names
Larry McVoy
lm at mcvoy.com
Sat Oct 18 06:42:29 AEST 2014
On Fri, Oct 17, 2014 at 04:37:08PM -0400, random832 at fastmail.us wrote:
> On Thu, Oct 16, 2014, at 22:52, Larry McVoy wrote:
> > abc.st_size
> >
> > Huh, abc is a struct stat.
> >
> > I get that it was a bug and needed to be fixed but I wish that everyone
> > still pretended that it was one namespace, makes code so much easier to
> > read.
>
> I'm not sure what your design is that you're more than a screen away
> from either its declaration, a stat call, or the fact that it's got size
> _and_ mode _and_ mtime etc.
>
> And if you do that, why stop there? Why not require the type to be
> repeated to dereference any pointer?
Hey, everyone is welcome to their own opinion and it doesn't have to match
mine. I review a lot of code, a lot of code that I didn't write. Lots of
times the review is in a web browser that doesn't know how to tag to the
definition. Sure I can clone the repo and make tags and tag to it but for
small reviews there is no need.
I do a bunch of code reviews every day. foo.size is a lot less helpful
than foo.vfs_size or whatever.
Your mileage may vary, where I work we optimize for the reader not for
the writer. That's how it is when you work for me. When I work for
you then your rules win :)
--
---
Larry McVoy lm at mcvoy.com http://www.mcvoy.com/lm
More information about the TUHS
mailing list