identifiers

What data type do you use for storing IDs?

Why is there a minimum character count for posting questions? o.O Anyway, my question is as clear as can be from the title. Do you use int, bigint, tinyint, whatever. It seems like a small thing I guess, I was just wondering what the usual practice is. ...

Should identifiers and comments be always in English or in the native language of the application and developers?

Duplicate: Do you use another language instead of english Related: Coding in other (spoken) languages Given a programming language (such as Java) that allows you to use non-ASCII identifiers (class, method, variable names), and an application written for non-English users, by developers who speak English only as a foreign language at v...

Does this Ruby code look up identifiers or the values associated with them?

I've been trying to understand this example Ruby code from a blog entry which says it uses the symbols :DEFAULT, :say and :@message "to look up identifiers". But from what I can tell, it's not looking up the identifiers, but the values associated with those identifiers. I thought identifiers are names of variables, methods, etc. So the i...

Are dollar-signs allowed in identifiers in C++?

What does the C++ standard say about using dollar signs in identifiers, such as Hello$World? Are they legal? ...

Proper way of having a unique identifier in Python?

Basically, I have a list like: [START, 'foo', 'bar', 'spam', eggs', END] and the START/END identifiers are necessary for later so I can compare later on. Right now, I have it set up like this: START = object() END = object() This works fine, but it suffers from the problem of not working with pickling. I tried doing it the following w...

Is there a method in C# to check if a string is a valid identifier

In Java, there are methods called isJavaIdentifierStart and isJavaIdentifierPart on the Character class that may be used to tell if a string is a valid Java identifier, like so: public boolean isJavaIdentifier(String s) { int n = s.length(); if (n==0) return false; if (!Character.isJavaIdentifierStart(s.charAt(0))) return fa...

Better identifier names?

How can I train myself to give better variable and function names (any user-defined name in a program). ...

FXCop violation CA1716 IdentifiersShouldNotMatchKeyword - is this really a problem?

We have recently started using FxCop on our code base and I am in the process of evaluating the problems. One is the IdentifiersShouldNotMatchKeywords issue. This applies to a namespace company.blah.Event, which it wants me to change to something else as event is a keyword. The docs say: When to Suppress Warnings Do not suppress a wa...

VB.NET, what is the difference between Boolean and [Boolean] ?

I ran some code through an automatic translator for C# to VB, and it translated some code like this: Public Property Title As [String] How is this different to Public Property Title As String and why do both exist? ...

Why does a programming language need keywords?

For example (in C): int break = 1; int for = 2; Why will the compiler have any problems at all in deducing that break and for are variables here? So, we need keywords because we want the programs to be readable we do not want to over-complicate the job of already complex compilers of today but most importantly, a language is lot ...

Retrieving data from a JSON sub array in javascript, where identifier starts with an integer

I must be missing something simple here, but I'm having trouble retrieving data from a JSON array response. I can access objects with identifiers that start with letters, but not ones that start with numbers. For example, I can access data.item[0].specs.overview.details But I can't access data.item[0].specs.9a99.details If anyone...

Is it a good idea to use unicode symbols as Java identifiers?

I have a snippet of code that looks like this: double Δt = lastPollTime - pollTime; double α = 1 - Math.exp(-Δt / τ); average += α * (x - average); Just how bad an idea is it to use unicode characters in Java identifiers? Or is this perfectly acceptable? ...