Changes between Version 16 and Version 17 of Records/NameSpacing
 Timestamp:
 Jan 9, 2012 7:59:56 AM (4 years ago)
Legend:
 Unmodified
 Added
 Removed
 Modified

Records/NameSpacing
v16 v17 4 4 Many thanks to the Frege author, Ingo Wechsung for explaining his implementation and exploring this implementation territory for us. 5 5 6 The DDC language (again, very much like Haskell, but focused on better and more predictable performance) puts forth a similar solution. See the [http://www.cse.unsw.edu.au/~benl/papers/thesis/lippmeierimpureworld.pdf thesis] section 2.7  2.7.4 pages 115  1196 The DDC language (again, very much like Haskell, but focused on effect tracking and an overall different conceptual approach to purity) puts forth a similar solution. See the [http://www.cse.unsw.edu.au/~benl/papers/thesis/lippmeierimpureworld.pdf thesis] section 2.7  2.7.4 pages 115  119 7 7 8 8 … … 118 118 119 119 The function update syntax is a new addition to Haskell that we do not need to immediately implement. 120 Any thoughts on the Frege field update syntax vs. the current Haskell syntax? 120 121 === Alternative approach: using tuple selectors === 122 123 {{{ 124 let { r.x = x'; r.y = y'; r.z = z'; } in r 125 }}} 126 127 If we allow tuples of selectors: 128 {{{ 129 r.(x, y, z) = (r.x, r.y, r.z) 130 }}} 131 132 then one can simply write 133 {{{ 134 let r.(x, y, z) = (x', y', z') in r 135 }}} 121 136 122 137 == Interaction with Typeclasses == … … 177 192 }}} 178 193 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 possible, but requires an operator that binds to the right. Perhaps a new operator like: `b <. a $ r` 194 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 possible, but requires an operator that binds to the right. 195 196 === Partial Application === 180 197 181 198 Partial application provides a potential solution: `b . .a $ r` 182 199 183 So if we have a function `f r = b r.a` then one can write it pointsfree: `b . .a` 200 So if we have a function `f r = b r.a` then one can write it pointsfree: `b . .a` 201