<html>
<head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Thanks Bob - that is what I was thinking/hoping. <br>
<br>
<div class="moz-cite-prefix">On 6/1/13 8:50 AM, Bob Ippolito wrote:<br>
</div>
<blockquote
cite="mid:CACwMPm_BtX7e_z4wN-3U11e0fGX4pNTGpygvFfQvK1kBOojG2g@mail.gmail.com"
type="cite">It's not copied in this case, nested records aren't
flattened or anything like that. Records are just tuples after
all. <span></span><br>
<br>
On Saturday, June 1, 2013, Bryan Hughes wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">
<div bgcolor="#FFFFFF" text="#000000"> Howdy!<br>
<br>
I am working on section of code that will be dealing with a
large number of records in a relatively tight loop and have a
question in how Erlang constructs a nested record.<br>
<br>
If I define a person and manager record:<br>
<br>
1> rd(person, {name, age}).<br>
person<br>
2> rd(manager, {person, dept}).<br>
manager<br>
<br>
Then create a person record:<br>
<br>
3> P = #person{name = bryan, age = 45}.<br>
#person{name = bryan,age = 45}<br>
<br>
And then a manager record:<br>
<br>
4> M = #manager{person = P, dept = foo}.<br>
#manager{person = #person{name = bryan,age = 45},dept = foo}<br>
<br>
When the manager record is created, is the nested person
record P referenced by the manager record M, or is it copied?
<br>
<br>
Thanks,<br>
Bryan<br>
<br>
<div>-- <br>
<p style="font-size:12px"> Bryan Hughes<br>
<b>Go Factory</b><br>
<a moz-do-not-send="true" href="http://www.go-factory.net"
target="_blank">http://www.go-factory.net</a><br>
<br>
<i>"Internet Class, Enterprise Grade"</i><br>
</p>
<p><br>
</p>
</div>
</div>
</blockquote>
</blockquote>
<div class="moz-signature">
<p><br>
</p>
</div>
</body>
</html>