<p>Are the naming conventions similar in different languages? If not, what are the differences?</p>

[{'answer_id': 49386, 'author': 'aku', 'author_id': 1196, 'author_profile': 'https://Stackoverflow.com/users/1196', 'pm_score': 1, 'selected': False, 'text': '<p>Of course there are some common guidelines but there are also differences due to difference in language syntax\\design.</p>\n\n<p>For .NET (C#, VB, etc) I would recommend following resource:</p>\n\n<ul>\n<li><a href="https://rads.stackoverflow.com/amzn/click/com/0321246756" rel="nofollow noreferrer" rel="nofollow noreferrer">Framework Design Guidelines</a> -\ndefinitive book on .NET coding\nguidelines including naming\nconventions</li>\n<li><a href="http://msdn.microsoft.com/en-us/library/xzf533w0(VS.71).aspx" rel="nofollow noreferrer">Naming Guidelines</a> - guidelines from Microsoft</li>\n<li><a href="http://msdn.microsoft.com/en-us/library/ms229045.aspx" rel="nofollow noreferrer">General Naming Conventions</a> - another set of MS guidelines (C#, C++, VB)</li>\n</ul>\n'}, {'answer_id': 49389, 'author': 'Daren Thomas', 'author_id': 2260, 'author_profile': 'https://Stackoverflow.com/users/2260', 'pm_score': 2, 'selected': False, 'text': '<p>Each language has a specific style. At least one.\nEach project adopts a specific style. At least, they should. This can sometimes be a different style to the canonical style your language uses - probably based on the dev leaders preferences.</p>\n\n<p>Which style to use? </p>\n\n<p>If your language ships with a good standard library, try to adopt the conventions in that library.</p>\n\n<p>If your language has a canonical book (The C Programming language, The Camel Book, Programming Ruby etc.) use that.</p>\n\n<p>Sometimes the language designers (C#, Java spring to mind) actually write a bunch of guidelines. Use those, especially if the community adopts them too.</p>\n\n<p>If you use multiple languages remember to stay flexible and adjust your preferred coding style to the language you are using - when coding in Python use a different style to coding in C# etc.</p>\n'}, {'answer_id': 49396, 'author': 'Rob Wells', 'author_id': 2974, 'author_profile': 'https://Stackoverflow.com/users/2974', 'pm_score': 1, 'selected': False, 'text': '<p>G\'day,</p>\n\n<p>One of the best recommendations I can make is to read the relevant section(s) of Steve McConnell\'s Code Complete (<a href="https://rads.stackoverflow.com/amzn/click/com/0735619670" rel="nofollow noreferrer" rel="nofollow noreferrer">Amazon Link</a>). He has an excellent discussion on naming techniques.</p>\n\n<p>HTH</p>\n\n<p>cheers,</p>\n\n<p>Rob</p>\n'}, {'answer_id': 49475, 'author': 'UnkwnTech', 'author_id': 115, 'author_profile': 'https://Stackoverflow.com/users/115', 'pm_score': 1, 'selected': False, 'text': '<p>I think that most naming conventions will vary but the developer, for example I name variables like: mulitwordVarName, however some of the dev I have worked with used something like mulitword_var_name or multiwordvarname or aj5g54ag or... I think it really depends on your preference.</p>\n'}, {'answer_id': 49530, 'author': 'Anders Sandvig', 'author_id': 1709, 'author_profile': 'https://Stackoverflow.com/users/1709', 'pm_score': 3, 'selected': True, 'text': "<p>As others have said, things vary a lot, but here's a rough overview of the most commonly used naming conventions in various languages:</p>\n\n<p><code>lowercase, lowercase_with_underscores</code>:</p>\n\n<p>Commonly used for local variables and function names (typical C syntax).</p>\n\n<p><code>UPPERCASE, UPPERCASE_WITH_UNDERSCORES:</code></p>\n\n<p>Commonly used for constants and variables that never change. Some (older) languages like BASIC also have a convention for using all upper case for all variable names.</p>\n\n<p><code>CamelCase, javaCamelCase:</code></p>\n\n<p>Typically used for function names and variable names. Some use it only for functions and combine it with lowercase or lowercase_with_underscores for variables. When javaCamelCase is used, it's typically used both for functions and variables.</p>\n\n<p>This syntax is also quite common for external APIs, since this is how the Win32 and Java APIs do it. (Even if a library uses a different convention internally they typically export with the (java)CamelCase syntax for function names.)</p>\n\n<p><code>prefix_CamelCase, prefix_lowercase, prefix_lowercase_with_underscores:</code></p>\n\n<p>Commonly used in languages that don't support namespaces (i.e. C). The prefix will usually denote the library or module to which the function or variable belongs. Usually reserved to global variables and global functions. Prefix can also be in UPPERCASE. Some conventions use lowercase prefix for internal functions and variables and UPPERCASE prefix for exported ones.</p>\n\n<p>There are of course many other ways to name things, but most conventions are based on one of the ones mentioned above or a variety on those.</p>\n\n<p>BTW: I forgot to mention Hungarian notation on purpose.</p>\n"}, {'answer_id': 49576, 'author': 'titanae', 'author_id': 2387, 'author_profile': 'https://Stackoverflow.com/users/2387', 'pm_score': 0, 'selected': False, 'text': '<p>Years ago an wise old programmer taught me the evils of <a href="http://en.wikipedia.org/wiki/Hungarian_notation" rel="nofollow noreferrer">Hungarian notation</a>, this was a real legacy system, Microsoft adopted it some what in the Windows SDK, and later in MFC. It was designed around loose typed languages like C, and not for strong typed languages like C++. At the time I was programming Windows 3.0 using Borland\'s Turbo Pascal 1.0 for Windows, which later became Delphi. </p>\n\n<p>Anyway long story short at this time the team I was working on developed our own standards very simple and applicable to almost all languages, based on simple prefixes -</p>\n\n<ul>\n<li>a - argument </li>\n<li>l - local </li>\n<li>m - member </li>\n<li>g - global</li>\n</ul>\n\n<p>The emphasis here is on scope, rely on the compiler to check type, all you need care about is scope, where the data lives. This has many advantages over nasty old Hungarian notation in that if you change the type of something via refactoring you don\'t have to search and replace all instances of it.</p>\n\n<p>Nearly 16 years later I still promote the use of this practice, and have found it applicable to almost every language I have developed in. </p>\n'}]
['https://Stackoverflow.com/questions/49382', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/184/']