[#1147] Copying RVALUE — why the lucky stiff <ruby-core@...>

Hello, everyone. Hope you are all doing well.

18 messages 2003/06/17
[#1155] Re: Copying RVALUE — matz@... (Yukihiro Matsumoto) 2003/06/20

Hi,

[#1157] Re: Copying RVALUE — why the lucky stiff <ruby-core@...> 2003/06/20

Yukihiro Matsumoto (matz@ruby-lang.org) wrote:

[#1173] class.c code cleanup (rb_class_*_instance_methods) — Matthew Dempsky <jivera@...>

Hi, I'm new to this mailing list so I don't know the procedure for

15 messages 2003/06/22
[#1174] Re: [Patch] class.c code cleanup (rb_class_*_instance_methods) — nobu.nokada@... 2003/06/22

Hi,

[#1175] Re: [Patch] class.c code cleanup (rb_class_*_instance_methods) — Matthew Dempsky <jivera@...> 2003/06/22

On Sun, 2003-06-22 at 05:36, nobu.nokada@softhome.net wrote:

[#1176] Re: [Patch] class.c code cleanup (rb_class_*_instance_methods) — nobu.nokada@... 2003/06/22

Hi,

[#1193] Re: [Patch] class.c code cleanup (rb_class_*_instance_methods) — Matthew Dempsky <jivera@...> 2003/06/25

On Sun, 2003-06-22 at 07:41, nobu.nokada@softhome.net wrote:

[#1177] Re: In 1.8.0 nil.to_s is not the same as "" — ts <decoux@...>

14 messages 2003/06/22

Re: Copying RVALUE

From: Tanaka Akira <akr@...17n.org>
Date: 2003-06-21 01:29:56 UTC
List: ruby-core #1165
In article <59B1CB2A-A379-11D7-A8D2-0030657CEB62@zenspider.com>,
  Ryan Davis <ryand-ruby@zenspider.com> writes:

> Couldn't you use a one element array as a pointer-pointer? I assumed 
> that's what Tanaka was hinting at.

No.  My recommendation is "object allocation should be done before it
is referenced".

In my view, this problem is "how to generate arbitrary graph
structure".  Since "- &a [*a, *a]" denotes cyclic structure, it is
clearly not possible to generate it in bottom-up or top-down.  Some
destructive update is required.

I think _why is trying to solve the problem by an operation for
general object replacement like "become" as:

a = BadAlias.new
e1 = a
e2 = a
a.replace Array[e1, e2] # Is BadAlias#replace implementable practically?

But I recommends:

a = Array.new
a[0] = a
a[1] = a

Anyway destructive update is used in both cases but later doesn't
require BadAlias#replace.
-- 
Tanaka Akira

In This Thread