From mboxrd@z Thu Jan 1 00:00:00 1970 From: lm@mcvoy.com (Larry McVoy) Date: Fri, 17 Oct 2014 13:42:29 -0700 Subject: [TUHS] early cc variable and function names In-Reply-To: <1413578228.125790.180311153.48CF1319@webmail.messagingengine.com> References: <20141017022913.7A77818C092@mercury.lcs.mit.edu> <20141017024049.GI17227@mercury.ccil.org> <20141017025242.GH6963@mcvoy.com> <1413578228.125790.180311153.48CF1319@webmail.messagingengine.com> Message-ID: <20141017204229.GA4249@mcvoy.com> 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