Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

Given this type name:

System.Nullable`1

How does the backtick character influence the pronunciation of this type name in its entirety?

Put another way, how do I fluently pronounce that type name?

EDIT : My apologies for the previous example. The new example is essentially the result of Console.WriteLine(typeof(DateTime?).FullName).

share|improve this question
3  
that's is not a valid type –  Kris Ivanov Jan 28 '11 at 3:07
    
Did you get this name from a decompiler? –  spender Jan 28 '11 at 3:13
    
@spender I've updated the question to explain where I got the string. My original question (and its example type name) was poorly constructed. –  lance Jan 28 '11 at 3:17
3  
@K Ivanov: It’s a perfectly valid .NET type name. I’ve removed “C#” from the question. –  Timwi Jan 28 '11 at 3:19
add comment

migrated from stackoverflow.com Jan 28 '11 at 4:28

This question came from our site for professional and enthusiast programmers.

6 Answers

The back tick followed by a number indicates the type's arity, which indicates the number of parameters required by the generic type. In your example Nullable '1 is an open type with one type parameter.

Type type = typeof(Nullable<>);

// this would throw a run-time error
// Cannot create an instance of Nullable '1[TValue] as it contains a
// generic parameter "type" is an open type
Object openTypeInstance = Activator.CreateInstance(type);

Type typeTwo = typeof(Nullable<DateTime>);

// will succeed. "typeTwo" is a close type of Nullable '1[DateTime]
Object closedTypeInstance = Activator.CreateInstance(typeTwo);
share|improve this answer
    
so it could be called a System.Nullable onesie –  Matt Ellen Jan 28 '11 at 8:00
add comment

Since these kinds of things are rarely talked about and much more commonly written, there is no standard or agreed-upon pronunciation for these things. People have different ideas on how to pronounce even some of the most common constructs like !b, array[i], etc.

That said, when confronted with something that is unobvious to pronounce, I usually use pronunciations in my head that would be meaningless/weird/silly if said out loud. The most common ones for me are hm and ding. For example, I read int[] as int ding dong. When talking to a real person, however, I’ll probably say int array.

It gets unwieldy with characters that have longish names if you need to be unambiguous when talking to someone else; for example, open curly brace (5 syllables). By comparison, backtick is a pretty snappy name. I think System dot Nullable backtick one is pretty much the shortest you’ll be able to do without being ambiguous.

share|improve this answer
    
I've heard it pronounced "nullable prime one". Have you ever heard "prime" used to describe such a character (perhaps in a non-programming context)? –  lance Jan 28 '11 at 3:27
    
@lance: Yes, a similar looking character is used in calculus to signify a derivative in Newton's notation. –  Zach Johnson Jan 28 '11 at 3:29
    
@Zach Johnson: Interesting. Wikipedia says "the prime is generally used to generate more variable names for things which are similar". That sounds similar to the character's use here (well, it appears to be a different character, but it's similar). –  lance Jan 28 '11 at 3:32
2  
@lance In mathematics you would often hear "prime" describing an apostrophe or apostrophe-like character. E.g. x vs x' (x vs x prime). It sometimes denotes a modified version of x and sometimes doesn't have a particular meaning beyond its user not wanting to pick a different letter. –  Anna Lear Jan 28 '11 at 4:37
    
@Anna The problem here is that a backtick is not an apostrophe and could therefore lead to confusion. –  Gary Rowe Jan 28 '11 at 9:22
add comment

Just saying "tick" seems workable: it's shorter than "backtick" and there's only one "tick" character on the keyboard. System dot nullable tick one has a snappy ring to it.

share|improve this answer
1  
+1 for applying the KISS principle, and removing the "single apostrophe prime" confusion. –  Gary Rowe Jan 28 '11 at 9:20
1  
tick is another name for apostrophe or single quote, though far less used than other names –  Ryathal Mar 22 '12 at 17:32
    
@Ryathal: Ada attributes use an apostrophe; Integer'Last is typically pronounced "Integer tick Last". If the apostrophe is never used in .net, I suppose that's not too much of a problem. –  Keith Thompson Mar 22 '12 at 17:39
add comment

The type's not valid, hence your question as well.

share|improve this answer
    
It’s a perfectly valid .NET type name. I’ve removed “C#” from the question. –  Timwi Jan 28 '11 at 3:21
    
really? oh that's something new I've picked up today then. Thanks –  evandrix Jan 28 '11 at 3:22
3  
From the documentation: "The name of a generic type ends with a backtick followed by digits representing the number of generic type arguments. The purpose of this name mangling is to allow compilers to support generic types with the same name but with different numbers of type parameters, occurring in the same scope. For example, reflection returns the mangled names Tuple'1 and Tuple'2 from the generic methods Tuple(Of T) and Tuple(Of T0, T1) in Visual Basic, or Tuple<T> and Tuple<T0, T1> in Visual C#." –  Cody Gray Jan 28 '11 at 4:00
add comment

Matters of pronunciation in programming have always been a point of interest for me. Internally, I read it as System . Nullable ` one. The symbols have no pronunciation, just the unique sensations of seeing the respective fullstop and backtick. It's certainly present, but somehow...indescribable. Aloud, I'd read it as System dot Nullable backtick one or System dot Nullable backquote one if I were speaking literally, or something like System dot Nullable of a single type if speaking in the abstract.

share|improve this answer
add comment

I treat them as subscript when speaking. So I say Nullable-sub-int for Nullable<int>, List-sub-string for List<string> or Foo-sub-int-string-decimal for Foo<int, string, decimal>.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.