Hinweise

In order to write future-proof code, it is recommended that you prefix (or suffix) anything that goes into the global namespace with an uncommon 3-4 letter prefix (or suffix) separated with an underscore. It is recommended that in order to prevent namespace clashes with other userland code that projects research existing prefixes (or suffixes) used in other projects and advertise their chosen prefix (or suffix) appropriately. Examples:

  • MyPx_someFunc()

  • Foo_Date

  • $asdf_dbh

add a note add a note

User Contributed Notes 2 notes

up
9
willian at gt44 dot com
9 months ago
I don't think it makes sense nowadays. We have namespaces now!
up
0
earnie at users dot sourceforge dot net
2 months ago
@willian at gt44 dot com: What about clashes of the namespace?  It is still good advice to check for previously used names before assigning anything to the global namespace.
To Top