Records in Haskell
Matthew Farkas-Dyck
strake888 at gmail.com
Wed Dec 21 21:06:33 CET 2011
Fair enough.
On 20/12/2011, Chris Smith <cdsmith at gmail.com> wrote:
> On Tue, Dec 20, 2011 at 5:57 PM, Matthew Farkas-Dyck
> <strake888 at gmail.com> wrote:
>> Another thought:
>> Perhaps bang as record selection operator. It would avoid further
>> corner cases of dot, and it's not unprecedented in Haskell (e.g.
>> Data.Map.!).
>
> We already have weird syntax rules for dot, and the proposed change
> (i.e., dot is an identifier when surrounded with spaces, else it's
> reserved syntax) actually makes the rules *simpler* in some ways
> rather than more complex... so why wouldn't we do it that way?
>
> The more difficult bit isn't about quirks of syntax, but rather about
> some significant semantic issues and differing design goals.... should
> we have a built-in notion of lenses... if so, which formulation...
> what kinds of punning do we want to preserve, and how deeply should
> punning go in the semantics, versus be a shallow kind of sugar... how
> does that interact with the type system... and so on. These are the
> significant problems.
>
More information about the Glasgow-haskell-users
mailing list