<div dir="ltr">Hmm, upon reading more, it seems like all record functionality is implemented in the compiler pass.<div><br></div><div style>It seems like the ability to address particular variable named locations in tuples would be desirable. I guess I'll have to use proplists or a dict for now, although it feels like overkill for what I'm doing.</div>
</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Sat, Feb 9, 2013 at 1:37 PM, Jeremy Ong <span dir="ltr"><<a href="mailto:jeremy@quarkgames.com" target="_blank">jeremy@quarkgames.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">Suppose I have a record that looks like<div><br></div><div>-record(foo, {bucket1, bucket2}).</div><div><br>
</div><div>I may want to pass in an argument specifying what bucket to perform the operation over.</div>
<div><br></div><div>For example,</div><div><br></div><div>Bucket = bucket1,</div><div><br></div><div>then later,</div><div><br></div><div>Use Foo#foo.Bucket for some operations and also modify Bucket with something like</div>
<div><br></div><div>Foo#foo{Bucket = bar}</div><div><br></div><div>Erlang doesn't seem to support this, and I don't see why not? Is there a better way to go about this?</div><div><br>
</div><div>Real World Example,</div><div><br></div><div>If the record stores data about two people playing a game against one another, and one of them disconnects, I want to perform some operations on the disconnected player's data, and notify the other player that the disconnect occurred. Not having this sort of functionality results in some code duplication and messy code (at least, if using records).</div>
</div>
</blockquote></div><br></div>