help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: insert-header-preprocessor-definition


From: Emanuel Berg
Subject: Re: insert-header-preprocessor-definition
Date: Sun, 15 Apr 2018 21:46:56 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux)

Yuri Khan wrote:

> The practical solution is, of course, the
> same as with all name conflict issues:
> Namespacing. That is, in your project, you
> start all preprocessor defines with the name
> of your project.

Woah, is *that* what people mean with
"namespacing"? I thought that was something
more advanced!

I remember people using it in C++ and I removed
it telling everyone it was a bad idea and
instead one should use the whole path to
identify things.

Looking back y'all, I don't know if that was
the right thing to say/do, but what I remember
everyone did it and in the end the software
worked :)

But that was not namespacing in this sense,
which is rather a naming convention, like
a poor-man's Hungarian notation or actually
what we do in Elisp all the time!

Maybe the supposedly "advanced" C++ way is
actually nothing more than syntax to automate
this and make people confused at the same time?

> On the other hand, the two or three compilers
> out there that are most likely to be used to
> compile your project already support
> #pragma once.

I'm on gcc 4.9. Should I get away with the
guards and use '#pragma once' instead?

-- 
underground experts united
http://user.it.uu.se/~embe8573


reply via email to

[Prev in Thread] Current Thread [Next in Thread]