One of the first thing a programmer learns is the various "types" that data can have. Commonly-used types include things like strings, integers, and arrays. Underneath the hood, all software data is, of course, composed of bits commonly represented by sequences of ones and zeros. But typing gives structure to those bits, and not only allows programmers to understand and reason about the code they write (it makes more sense, for instance, to think of a string as letters or words rather than bits), but also prevents errors through creating restrictions on what certain types can and cannot do (for instance, you can add floating point numbers but you can't add arrays). There are two major axes along which typing varies: a language can be either strongly or weakly typed; and a language can be statically or dynamically typed. You can loosely think of these, respectively, as a language's ability to prevent type errors, and when a language catches type errors. Static vs....
Comments
Post a Comment