Changes between Version 11 and Version 12 of Records/NameSpacing


Ignore:
Timestamp:
Jan 8, 2012 12:53:06 PM (4 years ago)
Author:
GregWeber
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Records/NameSpacing

    v11 v12  
    117117
    118118This is mostly just something interesting to contemplate.
    119 TDNR syntax does not have to be limited to records (although it probably should be for the initial implementation until this new record system is vetted).
     119TDNR syntax does not have to be limited to records (although it probably should be for the initial implementation until this new record system is vetted). I think it is a bad idea to attempt to accomplish general function chaining through extending TDNR. However, we can extent the function name-spaced to a data type concept to any data type (as it is in Frege), and use TDNR syntax for that. This way the dot (without spaces) *always* means tapping into a namespace (and simple type resolution).
     120
    120121Placing functions within a data name-space can make for nicer data-structure oriented code where the intent is clearer. It can help to achieve the data-oriented goal of OO without the entanglement of state. Is it possible to create "virtual" record field setters and getters that can be accessed through TDNR syntax and to control exactly what parts of the data namespace are accessible?