53
JANUARY 2012
more, backward compatibility requirements for languages
and protocols pose limitations. However, type safety is an
unavoidable ideal. Encoding a program’s static structure in
the type system (ensuring that every object has a type and
can hold only the values of its type) can be a major tool for
eliminating errors.
Programmers can and do vigorously disagree about the
meaning of “type” and its purpose. I tend to emphasize a
few significant benefits:
•
more specific interfaces (relying on named types),
implying early error detection;
•
opportunities for terse and general notation (such as
Do'stlaringiz bilan baham: