Topic: data type by lexical constraints
| |
Summary
The name or the context of a reference can declare its existence. A name used for file operations could implicitly declare the name to be a file. Lexical constraints can declare the type of the variable. This practice was started to give the programmer a wide variety of readily available names, but because typographical errors can easily create a valid but meaningless name, this practice does not exist is most modern programming languages.
An alternative used in Thesa is to pre-define data names for use anywhere in the database. This guarantees that a single name will have a single meaning while at the same time removing the declarative overhead from the programmer. (cbb 5/80)
Subtopic: contextual declaration
QuoteRef: elcoEW_1971 ;;481 a'=1 defines new variable A with value of 1
| QuoteRef: sammJE_1969 ;;575 contextual declaration eg get file (master) data declares mast as type file
| Subtopic: default typing
QuoteRef: simscrip_1971 ;;152 Normally ... for default typing
| Subtopic: implicit typing
Quote: provide implicit typing for initialized type declarations [»dorwSM1_1997]
| Quote: implicitly typed local declaration from copy assignment; var keyword [»bierGM10_2007]
| Quote: LINQ infers IEnumerable from a select expression; it compiles with a lambda expression [»bierGM10_2007]
Quote: an anonymous type is defined by new(f=v, ...); equivalent types if same property names and value types [»bierGM10_2007]
| |
Related Topics
Topic: data type by lexical constraints (15 items)
|