Jon Jagger (11) [Avatar] Offline
#1
Another option is to use boxing.
JJ
jon.skeet (448) [Avatar] Offline
#2
Re: 4.1.2 Patterns for null values in C# 1
> Another option is to use boxing.

Is that not covered at the start of the section:

"Pattern 2: a reference type wrapper
The second solution can take two forms – the simplest one being to just use object as the variable type, boxing and unboxing values as necessary."

If that's not what you meant, could you expand on your suggestion a bit?

(Great to see that you're reading the book though smilie

Jon
Jon Jagger (11) [Avatar] Offline
#3
Re: 4.1.2 Patterns for null values in C# 1
Yeah, that covers it. Missed that. Teach me to post an email before coffee.
JJ
Jon Jagger (11) [Avatar] Offline
#4
Re: 4.1.2 Patterns for null values in C# 1
The other thing was 4.2.4 The supporting cast: System.Nullable

Perhaps better not to use the word cast in the title? How about "The helper class: "

JJ
jon.skeet (448) [Avatar] Offline
#5
Re: 4.1.2 Patterns for null values in C# 1
> The other thing was 4.2.4 The supporting cast:
> System.Nullable
>
> Perhaps better not to use the word cast in the title?
> How about "The helper class: "

Hmm, I see your point. I don't think there's a phrase along the lines of "supporting cast" that keeps the whole star role / supporting actor idea going.

Probably worth changing, although I'm not sure what to, yet...

Jon
ross.bradbury (9) [Avatar] Offline
#6
Re: 4.1.2 Patterns for null values in C# 1
I noted that "supporting cast" adds an extra bit of confusion as well. How about "supporting actor?"
jon.skeet (448) [Avatar] Offline
#7
Re: 4.1.2 Patterns for null values in C# 1
Okay, with two people mentioning it, it'll definitely get changed smilie

Not sure what to yet though - I'm not comfortable with "supporting actor" although I'm not entirely sure why.

Jon
tomten (19) [Avatar] Offline
#8
Re: 4.1.2 Patterns for null values in C# 1
Since this isn't changed in meapch13, let me third the sentiment given by the two others in this thread. I think I speak on behalf of many non-native English speakers when I say that "the supporting cast" will only after several re-reads be interpreted as intended. Sorry about the ignorance (again, on behalf of said lot).
jon.skeet (448) [Avatar] Offline
#9
Re: 4.1.2 Patterns for null values in C# 1
No problem - it's been fixed in the "proper manuscript" to "Support from the non-generic Nullable class".

Jon