Icon+Unicon/Intro: Difference between revisions
Content added Content deleted
m (+ Datatypes framework) |
|||
Line 19: | Line 19: | ||
Icon and Unicon do not require strict static typing of variables as does languages like [[Pascal]], nor does it require type definitions to reserve space such as in languages such as [[C]]. In fact, variables may happily change type from one moment to the next. Knowing this you might expect that declarations are non-existent. |
Icon and Unicon do not require strict static typing of variables as does languages like [[Pascal]], nor does it require type definitions to reserve space such as in languages such as [[C]]. In fact, variables may happily change type from one moment to the next. Knowing this you might expect that declarations are non-existent. |
||
Declarations are optional and any undeclared variables are either (a) parameters to procedures or (b) local to procedures. This design decision ensured that Icon/Unicon are not susceptible to the kind of side-effects that the global nature of variables in [SNOBOL4] led to. |
Declarations are optional and any undeclared variables are either (a) parameters to procedures or (b) local to procedures. This design decision ensured that Icon/Unicon are not susceptible to the kind of side-effects that the global nature of variables in [[SNOBOL4]] led to. |
||
Still, declarations are desirable for clarity and needed for a number of special cases: |
Still, declarations are desirable for clarity and needed for a number of special cases: |