An identifier is a name that identifies either a unique object or a unique class of objects.
Questions tagged [identifier]
1353 questions
24
votes
2 answers
Apostrophe in identifiers in Haskell
I found this code snipped on the internet:
digits 0 = [0]
digits n = digits' n []
where digits' 0 ds = ds
digits' n ds = let (q,r) = quotRem n 10
in digits' q (r:ds)
sumOfDigits = sum . digits
Can someone quickly…

kiltek
- 3,183
- 6
- 47
- 70
24
votes
2 answers
Does C++11 allow dollar signs in identifiers?
Are dollar-signs allowed in identifiers in C++03? covers that dollar signs in identifiers are not allowed in C++03. GCC provides it as a C extension and properly gives a diagnostic in C++03 mode. However, in C++11, int $ = 0 will compile without…
user3920237
24
votes
2 answers
ElasticSearch ID constraints
For ElasticSearch document IDs, are there any character constraints or restrictions?
I am really interested to know if forward slash '/' would cause any issues here? I have some news feeds which I would like to index. The problem is that the…

Gabbar
- 4,006
- 7
- 41
- 78
21
votes
2 answers
How do I write the qualified name of a symbol in Haskell?
I've got a name clash between two different Haskell modules that want to use the same infix operator (<*>). The Haskell 98 report says that
modid.varsym
is permitted, but I can't get it to work. In their entirety here are Test.hs:
module…

Norman Ramsey
- 198,648
- 61
- 360
- 533
20
votes
7 answers
What is the bundle identifier of apple's default applications in iOS?
I need to know the bundle identifiers for apple applications, such as mail, contacts, safari, photos, game center, settings, calendar, iPod, App store, camera, ... After searching for quite a while I found out they may be com.apple.{somethingelse}

Jorge Aguirre
- 2,787
- 3
- 20
- 27
20
votes
3 answers
singular or plural identifier for a dictionary?
When naming a container , what's a better coding style:
source = {}
#...
source[record] = some_file
or
sources = {}
#...
sources[record] = some_file
The plural reads more natural at creation; the singular at assignment.
And it is not an idle…

max
- 49,282
- 56
- 208
- 355
20
votes
3 answers
Is there a length limit on g++ variable names?
See title

anon
- 41,035
- 53
- 197
- 293
20
votes
2 answers
Payload bundle identifier mismatch with Xcode at validation step
I got ios app project from someone (say zzz), which has been uploaded to Apple App Store, but removed from the store later somehow (not quite sure why). I now need work on this project.
First, I created an app named 'yyyyy with me' in…

Tony Xu
- 3,031
- 4
- 32
- 43
19
votes
2 answers
Unicode subscripts and superscripts in identifiers, why does Python consider XU == Xᵘ == Xᵤ?
Python allows unicode identifiers. I defined Xᵘ = 42, expecting XU and Xᵤ to result in a NameError. But in reality, when I define Xᵘ, Python (silently?) turns Xᵘ into Xu, which strikes me as somewhat of an unpythonic thing to do. Why is this…

gerrit
- 24,025
- 17
- 97
- 170
18
votes
2 answers
Practical application of backticks in Swift
From this document:
To use a reserved word as an identifier, put a backtick (`) before and after it.
I'm curious about the practical application of this. When would you actually want to name something `class`, `self`, etc.?
Or, relatedly, why did…

Luke
- 7,110
- 6
- 45
- 74
17
votes
5 answers
Loading multiple entities by id efficiently in Hibernate
So, I'm getting a number of instances of a particular entity by id:
for(Integer songId:songGroup.getSongIds()) {
session = HibernateUtil.getSession();
Song song = (Song) session.get(Song.class,id);
processSong(song);
}
This generates a SQL…

Paul Taylor
- 13,411
- 42
- 184
- 351
17
votes
4 answers
Fixed identifier for a machine (uuid.getnode)
I'm trying to find something I can use as a unique string/number for my script that is fixed in a machine and easily obtainable(cross-platform). I presume a machine would have a network card. I don't need it to be really unique, but the necessary is…

Peter Badida
- 11,310
- 10
- 44
- 90
16
votes
7 answers
Remove first levels of identifier in array
I think this has been up before, but could'nt find any answer to it. If it's already answered please point me in the right direction with a link.
I have an array that I wan't to remove the first levels of identifier. I think there is a function for…

Fredrik
- 627
- 6
- 14
- 28
16
votes
7 answers
Are dollar-signs allowed in identifiers in C++03?
What does the C++ standard say about using dollar signs in identifiers, such as Hello$World? Are they legal?

Gili
- 86,244
- 97
- 390
- 689
16
votes
5 answers
Which part of a GUID is most worth keeping?
I need to generate a unique ID and was considering Guid.NewGuid to do this, which generates something of the form:
0fe66778-c4a8-4f93-9bda-366224df6f11
This is a little long for the string-type database column that it will end up residing in, so I…

izb
- 50,101
- 39
- 117
- 168