albertodemichelis / squirrel

Official repository for the programming language Squirrel
http://www.squirrel-lang.org
MIT License
916 stars 156 forks source link

reserved identifier violation #56

Open elfring opened 8 years ago

elfring commented 8 years ago

I would like to point out that identifiers like "_SQUIRREL_H_" and "_SQVM_H_" do not fit to the expected naming convention of the C++ language standard. Would you like to adjust your selection for unique names?

zeromus commented 8 years ago

There isn't an expected naming convention of the c++ language standard. That certainly isn't one. That's Some Guy's Code Style Guide.

Here's examples of include guards pulled at random from some different compilers so you can see how standard it is.

#ifndef _GLIBCXX_VECTOR
#ifndef _VECTOR_
#ifndef _RWSTD_VECTOR_INCLUDED
elfring commented 8 years ago

How do you think about to avoid that this software depends on undefined behaviour?

zeromus commented 8 years ago

On the list of undefined behaviours likely to strike or cause serious problems, this one is on a napkin stapled to a post-it note attached to the very end, written just above running the compiler within a blackhole's event horizon in another universe. Any one of the other #defines in the squirrel headers is more likely to cause problems.