Changes between Version 14 and Version 15 of Records/NameSpacing


Ignore:
Timestamp:
Jan 9, 2012 7:13:40 AM (2 years ago)
Author:
GregWeber
Comment:

TDNR syntax

Legend:

Unmodified
Added
Removed
Modified
  • Records/NameSpacing

    v14 v15  
    165165== Partial application == 
    166166 
    167 Fill this out by first looking at TDNR 
    168 `(.a) r == r.a` 
     167see [wiki:TypeDirectedNameResolution TDNR] syntax discusion. 
     168`.a r == r.a` 
    169169 
    170170== Potential Downside: mixing of 2 styles of code == 
     
    177177}}} 
    178178 
    179 It bothers some that the code does not look like the previous `b a r` - chiefly that the record is now in the middle. Is it possible we can have an equivalent of the dot that changes the ordering? `b a.r` is theoretically possible, but probably extraordinarily confusing. Perhaps a new operator like: `b a <. r` 
     179It bothers some that the code does not look like the previous `b a r` - chiefly that the record is now in the middle. Is it possible we can have an equivalent of the dot that changes the ordering? `b a.r` is theoretically possible, but probably extraordinarily confusing. Perhaps a new operator like: `b <. a $ r` 
    180180 
    181 Partial application provides a potential solution: `b (.a) r`                                                                                                                                                                                                
     181Partial application provides a potential solution: `b . .a $ r` 
     182So if we have a function `f r = b r.a`  then one can write it points-free: `b . .a`