Timeline for Why use a special "Name" class (instead of just a string) for representing object names in C++?
Current License: CC BY-SA 4.0
6 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Apr 28, 2024 at 21:18 | comment | added | Simon Geard | Yes, the product I work on has a lot of numeric IDs, and while we don't actually do it, it would be useful sometimes to have (e.g.) methods which accept CustomerNumber and SiteNumber types instead of a pair of integers which can be (and often are) easily transposed. | |
| Apr 26, 2024 at 16:45 | comment | added | rwong | Indeed, the tagged integer technique is used in many projects to solve this issue; and to apply this technique in C++, it is necessary to define those ID types as classes. | |
| Apr 26, 2024 at 11:17 | history | edited | freakish | CC BY-SA 4.0 | deleted 5 characters in body |
| Apr 26, 2024 at 9:31 | history | edited | freakish | CC BY-SA 4.0 | added 283 characters in body |
| Apr 26, 2024 at 8:27 | history | edited | freakish | CC BY-SA 4.0 | added 355 characters in body |
| Apr 26, 2024 at 8:21 | history | answered | freakish | CC BY-SA 4.0 |