(#) is a legal operator today and is used in a number of libraries.<br><br><div class="gmail_quote">On Sun, Jun 30, 2013 at 11:38 PM, <span dir="ltr"><<a href="mailto:amindfv@gmail.com" target="_blank">amindfv@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">As long as we're bikeshedding...<br>
<br>
Possibly '#' is unused syntax -- Erlang uses it for its records too, so we wouldn't be pulling it out of thin air. E.g. "person#firstName"<br>
<br>
Tom<br>
<br>
<br>
El Jun 30, 2013, a las 22:59, AntC <<a href="mailto:anthony_clayden@clear.net.nz">anthony_clayden@clear.net.nz</a>> escribió:<br>
<div class="HOEnZb"><div class="h5"><br>
>> Carter Schonwald <carter.schonwald <at> <a href="http://gmail.com" target="_blank">gmail.com</a>> writes:<br>
>><br>
>> indeed, this relates / augments record puns syntax already in<br>
> GHC <a href="http://www.haskell.org/ghc/docs/latest/html/users_guide/syntax-" target="_blank">http://www.haskell.org/ghc/docs/latest/html/users_guide/syntax-</a><br>
> extns.html#record-puns.<br>
><br>
> Uh-oh. That documentation gives an example, and it exactly explains the<br>
> weird type-level error I got when I tried to use the proposed syntax<br>
> myself:<br>
><br>
> Note that:<br>
><br>
> * Record punning can also be used in an expression, writing, for<br>
> example,<br>
><br>
> let a = 1 in C {a} -- !!!<br>
><br>
> instead of<br>
><br>
> let a = 1 in C {a = a}<br>
><br>
> The expansion is purely syntactic, so the expanded right-hand side<br>
> expression refers to the nearest enclosing variable that is spelled the<br>
> same as the field name.<br>
><br>
> IOW the proposal _does_ conflict with existing syntax. (And I guess I can<br>
> see a use for the example. Note that outside of that let binding, `a`<br>
> would be a field selector function generated from the data decl in which<br>
> field `a` appears -- that's the weirdity I got.)<br>
><br>
> I suppose the existing syntax has a data constructor in front of the<br>
> braces, whereas the proposal wants a term. But of course a data<br>
> constructor is a term.<br>
><br>
> So the proposal would be a breaking change. Rats! Is anybody using that<br>
> feature?<br>
><br>
>><br>
>> On Sun, Jun 30, 2013 at 2:59 AM, Judah Jacobson <judah.jacobson <at><br>
> <a href="http://gmail.com" target="_blank">gmail.com</a>> wrote:<br>
>><br>
>> Unlike dot notation, this is unambiguous and doesn't conflict with any<br>
> existing syntax (AFAIK). ...<br>
><br>
><br>
> _______________________________________________<br>
> Glasgow-haskell-users mailing list<br>
> <a href="mailto:Glasgow-haskell-users@haskell.org">Glasgow-haskell-users@haskell.org</a><br>
> <a href="http://www.haskell.org/mailman/listinfo/glasgow-haskell-users" target="_blank">http://www.haskell.org/mailman/listinfo/glasgow-haskell-users</a><br>
<br>
_______________________________________________<br>
Glasgow-haskell-users mailing list<br>
<a href="mailto:Glasgow-haskell-users@haskell.org">Glasgow-haskell-users@haskell.org</a><br>
<a href="http://www.haskell.org/mailman/listinfo/glasgow-haskell-users" target="_blank">http://www.haskell.org/mailman/listinfo/glasgow-haskell-users</a><br>
</div></div></blockquote></div><br>