Re: normalizing variable names

Bram Moolenaar <[email protected]>
Newsgroups gmane.comp.tools.aap.devel
Message-ID <[email protected]>
Adriaan de Groot wrote:

> the qt module sets the variable qt_includedir to the value of Qt's include 
> dir. Gosh, that's really mutiply redundant. Especially when accessing it as 
> $m_qt.qt_includedir. The attached patch changes the variable name to plain 
> includedir, where the module scope is used to distinguish it from other 
> includedirs folks may have ($m_kde.includedir and $m_qt.includedir come to 
> mind). 
> 
> Now,. I know we had a discussion about variable naming. I don't know if this 
> kind of "read only" variable (it's not used elsewhere, it's just a 
> convenience for the user who can write INCLUDE += -I$m_qt.includedir), falls 
> under the existing norms.

qt_includedir is indeed a redundant name.

The main variable $QTDIR is already  all-caps.  Since "includedir",
"bindir" and "libdir" are not local variables, I think they should also
be all-caps.

A simplification is to leave out these variables and let the user use
$QTDIR/include, $QTDIR/lib and $QTDIR/bin.  That at least avoids trouble
when $QTDIR is changed after loading the qt module (don't know if that
would cause trouble anyway).

-- 
hundred-and-one symptoms of being an internet addict:
206. You religiously respond immediately to e-mail, while ignoring
     your growing pile of snail mail.

 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
///          Creator of Vim - Vi IMproved -- http://www.Vim.org          \\\
\\\              Project leader for A-A-P -- http://www.A-A-P.org        ///
 \\\  Help AIDS victims, buy here: http://ICCF-Holland.org/click1.html  ///


-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
SourceForge.net hosts over 70,000 Open Source Projects.
See the people who have HELPED US provide better services:
Click here: http://sourceforge.net/supporters.php
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.