xii
Contents
The Kitchen Sink
239
Item 19: Use Static Data Members with Caution
239
Item 20: Use Interfaces in Lieu of Classes
240
Item 21: Use Comparer<T> for All Type Comparisons
241
Item 22: Use Nullable<T> for Optional Values
241
Item 23: Use EventHandler<T> for All Events
241
Summary 242
Chapter 11: Under the Hood
243
Overview 243
Assumptions
244
High-Level Goals
244
Validate at Declaration
244
Simplicity
244
Platform Conformity
245
Language Agnostic Generics
245
No Boxing
245
No Meta-Programming
245
IL Representation of Generic Types
246
Specialization and Sharing
248
Code Specialization
248
Code Sharing
248
The .NET Hybrid Model
248
Just-in-Time Specialization
249
Exact Run-Time Types
254
Support for Polymorphic Recursion
256
NGen and Generic Types
257
Performance 259
Memory Footprint
261
Backward Compatibility
262
Summary 262
Chapter 12: Using Generics with C++
263
Templates or Generics?
263
Blurring the Lines
264
No Limits
264
Generic Classes in C++
264
Consuming Generic Classes
265
Inheritance
266
Nested Classes
267
02_559885 ftoc.qxd 9/8/05 11:02 PM Page xii
Summary :
for All Events 241 Summary 242 Chapter 11: Under the Hood 243 Overview 243 Assumptions 244 High-Level Goals 244 Validate at Declaration 244 Simplicity 244 Platform Conformity 245 Language Agnostic Generics 245 No Boxing 245 No Meta-Programming 245 IL Representation of Generic Types 246 Specialization and Sharing 248 Code Specialization 248 Code Sharing 248 The .NET Hybrid Model 248 Just-in-Time Specialization 249 Exact Run-Time Types 254 Support for Polymorphic Recursion 256 NGen and Generic Types 257 Performance 259 Memory Footprint 261 Backward Compatibility 262 Summary 262 Chapter 12: Using Generics with C++ 263 Templates or Generics?
Tags :
use,item,245,248,244,generic,classes,241,264,generics,types,specialization,chapter