<br><br><div class="gmail_quote">On Sat, Dec 29, 2012 at 1:42 PM, Steve Davis <span dir="ltr"><<a href="mailto:steven.charles.davis@gmail.com" target="_blank">steven.charles.davis@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
fixed typo of missed "when" to avoid the distraction from my real question!<br>
<div class="im"><br>
On Dec 29, 2012, at 6:39 AM, Steve Davis <<a href="mailto:steven.charles.davis@gmail.com">steven.charles.davis@gmail.com</a>> wrote:<br>
<br>
> Looking at the age of the last entry in this thread, it seems that the discussion about frames has rather tailed off again. A pity.<br>
><br>
> I'd like to add support for both the introduction of frames (and for the EEP 20 on "splitting atoms"). They appear to me to solve fairly pressing issues.<br>
><br>
> Personally, I _strongly_ prefer the proposed "erlson form" of notation for frames above the suggested <{}> and ~.<br>
><br>
> I do have a question (re: section 8.2 "What we've lost...")... I frequently use pattern matching to constrain arguments to type, e.g.:<br>
><br>
> foo(R = #record{}) -> etc<br>
><br>
> In frames, are we limited to:<br>
</div>> foo(F) when is_frame(F) -> etc<br>
> ?<br></blockquote><div><br></div><div>I think they might be called maps in the future...</div><div>maps can have any ground term as a key. </div><div><br></div><div>If you want the equivalent of the above you'd have to reserve a </div>
<div>specific key to emulate the record name. So you'd have something like this:</div><div><br></div><div>foo(R = #record{}) -> ...</div><div>foo(R = #another_record{}) -> ...</div><div><br></div><div>would be (with maps) (using the key 'type' to name the record)</div>
<div><br></div><div>foo(#{type=record}=R) -> ...</div><div>foo(#{type=another_record}=R) -> ...</div><div><br></div><div>/Joe</div><div> </div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div>
<div><br></div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
><br>
> regs,<br>
> /s<br>
<br>
_______________________________________________<br>
erlang-questions mailing list<br>
<a href="mailto:erlang-questions@erlang.org">erlang-questions@erlang.org</a><br>
<a href="http://erlang.org/mailman/listinfo/erlang-questions" target="_blank">http://erlang.org/mailman/listinfo/erlang-questions</a><br>
</blockquote></div><br>