<div dir="ltr"><div>Personally I think it would be very dubious to change it as you would be changing the meaning of matching for those variables.<br><br></div>Robert<br><br></div><div class="gmail_extra"><br><div class="gmail_quote">On 30 March 2016 at 23:04, Björn-Egil Dahlberg <span dir="ltr"><<a href="mailto:wallentin.dahlberg@gmail.com" target="_blank">wallentin.dahlberg@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">OTP 20.0 at the earliest. However, no definitive decision has been made about when or even if.</div><div class="gmail_extra"><br><div class="gmail_quote">2016-03-30 22:59 GMT+02:00 Luis Azedo <span dir="ltr"><<a href="mailto:luis.azedo@factorlusitano.com" target="_blank">luis.azedo@factorlusitano.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Thanks for the reply.<div><br></div><div>so in the future in should work, right ? do you know which version/release we should wait before testing this ?</div><div><br></div><div>Thanks</div><div> </div></div><div><div class="h5"><div><div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Mar 30, 2016 at 9:54 PM, Björn-Egil Dahlberg <span dir="ltr"><<a href="mailto:wallentin.dahlberg@gmail.com" target="_blank">wallentin.dahlberg@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">This is a current limitation with maps and bitsyntax. Variables has to be bound before being used as an expression in a pattern.</div><div class="gmail_extra"><br><div class="gmail_quote"><div><div>2016-03-30 22:01 GMT+02:00 Luis Azedo <span dir="ltr"><<a href="mailto:luis.azedo@factorlusitano.com" target="_blank">luis.azedo@factorlusitano.com</a>></span>:<br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div><div dir="ltr"><div>Hi,</div><div><br></div>this doesn't compile in 18.3. is it supposed to work with the maps spec ? maybe in a later release ?<div><br></div><div>-spec my_match(atom(), atom(), map()) -> any().<br><div>my_match(Classification, CarType, #{my_key := #{ Classification := #{ <<"cars">> := #{ CarType := Map}}}}) -><br></div><div>....</div><div><div>variable 'Classification' is unbound</div><div>variable 'CarType' is unbound</div></div><div><br></div><div><br></div><div>this works but we're not taking advantage of function clauses.</div><div><br></div><div>my_match(Classification, CarType, M ) -></div><div> #{my_key := #{ Classification := #{ <<"cars">> := #{ CarType := Map}}}} = M,<br></div></div><div> Map.</div><div>....</div><div><br></div><div>TIA</div><div><br></div></div>
<br></div></div>_______________________________________________<br>
erlang-questions mailing list<br>
<a href="mailto:erlang-questions@erlang.org" target="_blank">erlang-questions@erlang.org</a><br>
<a href="http://erlang.org/mailman/listinfo/erlang-questions" rel="noreferrer" target="_blank">http://erlang.org/mailman/listinfo/erlang-questions</a><br>
<br></blockquote></div><br></div>
</blockquote></div><br></div>
</div></div></div></div></blockquote></div><br></div>
<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" rel="noreferrer" target="_blank">http://erlang.org/mailman/listinfo/erlang-questions</a><br>
<br></blockquote></div><br></div>