On 2016-05-02 15:02:44 -0500, Derek Martin wrote: > On Sun, May 01, 2016 at 07:26:53PM -0700, Kevin J. McCarthy wrote: > > On Sun, May 01, 2016 at 07:02:38PM +0200, Vincent Lefevre wrote: > > > On 2016-04-26 09:54:48 -0700, Kevin J. McCarthy wrote: > > > > David, Brendan, Vincent (and anyone else), does the prefix 'MUTT_' sound > > > > reasonable, or is there another prefix that would be better? > > > > > > It is reasonable, but as reasonable as M_ (for a prefix used > > > internally). If systems can break M_, they could break almost any > > > prefix (if particular if it corresponds to something readable). > > The difference is the OS is using M_, and such short prefixes are > common for OS-level libraries.
That's really the worst thing that they could do. The reason is that public non-OS library headers should not use reserved names (because they are reserved), so that the best thing they can do is to use long prefixes to avoid clashes between them. Thus, applications should use only short prefixes (for private use) in order to reduce the risk of clashes with these library headers (due do chains of inclusions, they don't always know what headers are used). And this is what they often do in practice. > It's not so surprising that there's a conflict here. Whereas using > MUTT_ instead--I'm certainly unaware of any other software that uses > it, and for a new project to start Mutt clearly has been around a > lot longer... What is the likelihood that you'd find a conflict in a > library that's meant to compile with Mutt, or which Mutt itself > requires to compile? Methinks pretty slim... :) But that's not impossible. This wouldn't be the first time a new library takes a name already used by an application, with a possible future dependency. It's a pity that a broken OS forces bad practice in application code. -- Vincent Lefèvre <[email protected]> - Web: <https://www.vinc17.net/> 100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/> Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)
