[#600] A `File' is not a `IO'????? — clemens.hintze@...

17 messages 1999/08/10
[#602] Re: A `File' is not a `IO'????? — matz@... (Yukihiro Matsumoto) 1999/08/10

Hi,

[#679] Documentation about RD? — Clemens Hintze <c.hintze@...>

Hi,

78 messages 1999/08/17
[#680] Summary of discussion about RD (Re: Documentation about RD?) — Toshiro Kuwabara <toshirok@...3.so-net.ne.jp> 1999/08/18

=begin

[#683] Re: Summary of discussion about RD (Re: Documenta tion about RD?) — clemens.hintze@... 1999/08/18

On 18 Aug, Toshiro Kuwabara wrote:

[#686] Re: Summary of discussion about RD (Re: Documenta tion about RD?) — gotoken@... (GOTO Kentaro) 1999/08/18

Hi,

[#687] Re: Summary of discussion about RD (Re: Docum enta tion about RD?) — clemens.hintze@... 1999/08/18

On 18 Aug, GOTO Kentaro wrote:

[#693] Re: Summary of discussion about RD (Re: Docum enta tion about RD?) — Toshiro Kuwabara <toshirok@...3.so-net.ne.jp> 1999/08/18

Hi,

[#695] Re: Summary of discussion about RD (Re: Docum enta tion about RD?) — Clemens Hintze <c.hintze@...> 1999/08/18

On 19 Aug, Toshiro Kuwabara wrote:

[#697] Re: Summary of discussion about RD (Re: Docum enta tion about RD?) — Toshiro Kuwabara <toshirok@...3.so-net.ne.jp> 1999/08/19

Hi,

[#703] Re: Summary of discussion about RD (Re: Docum enta tion about RD?) — Clemens Hintze <c.hintze@...> 1999/08/19

On 19 Aug, Toshiro Kuwabara wrote:

[#706] Re: Summary of discussion about RD (Re: Docum enta tion about RD?) — Toshiro Kuwabara <toshirok@...3.so-net.ne.jp> 1999/08/19

Hi,

[#681] Re: Summary of discussion about RD (Re: Documentation about RD?) — gotoken@... (GOTO Kentaro) 1999/08/18

Hi,

[#682] Re: Summary of discussion about RD (Re: Documentation about RD?) — Toshiro Kuwabara <toshirok@...3.so-net.ne.jp> 1999/08/18

Hi,

[#684] Re: Summary of discussion about RD (Re: Documentation about RD?) — TAKAHASHI Masayoshi <maki@...> 1999/08/18

Hi Tosh and all,

[#685] Re: Summary of discussion about RD (Re: Documentation about RD?) — gotoken@... (GOTO Kentaro) 1999/08/18

Hi,

[#689] Re: Summary of discussion about RD (Re: Documentation about RD?) — Toshiro Kuwabara <toshirok@...3.so-net.ne.jp> 1999/08/18

Hi,

[#694] Re: Summary of discussion about RD (Re: Documentation about RD?) — matz@... (Yukihiro Matsumoto) 1999/08/18

Hi,

[#700] Re: Summary of discussion about RD (Re: Documentation about RD?) — Toshiro Kuwabara <toshirok@...3.so-net.ne.jp> 1999/08/19

Hi,

[#702] Re: Summary of discussion about RD (Re: Documentation about RD?) — matz@... (Yukihiro Matsumoto) 1999/08/19

Hi,

[#704] Re: Summary of discussion about RD (Re: Docum entation about RD?) — Clemens Hintze <c.hintze@...> 1999/08/19

On 19 Aug, Yukihiro Matsumoto wrote:

[#719] Re: Summary of discussion about RD (Re: Docum entation about RD?) — Toshiro Kuwabara <toshirok@...3.so-net.ne.jp> 1999/08/20

Hi,

[#720] Re: Summary of discussion about RD (Re: Docum entation about RD?) — clemens.hintze@... 1999/08/20

On 20 Aug, Toshiro Kuwabara wrote:

[#721] Re: Summary of discussion about RD (Re: Docum entation about RD?) — Toshiro Kuwabara <toshirok@...3.so-net.ne.jp> 1999/08/20

Hi,

[#722] Re: Summary of discussion about RD (Re: Docum entation about RD?) — clemens.hintze@... 1999/08/20

On 21 Aug, Toshiro Kuwabara wrote:

[#723] Re: Summary of discussion about RD (Re: Docum entation about RD?) — Toshiro Kuwabara <toshirok@...3.so-net.ne.jp> 1999/08/20

Hi,

[#737] RD with multi charset — Minero Aoki <aamine@...>

Hi, I'm Minero Aoki. This is my first mail in this mailling list.

26 messages 1999/08/22

[ruby-talk:00541] Re: A new discussion topic ;-)

From: clemens.hintze@...
Date: 1999-08-02 09:57:37 UTC
List: ruby-talk #541
On  2 Aug, HIWADA Kazuhiro wrote:
> Hi,
> 
> From: Clemens Hintze <c.hintze@gmx.net>
> Subject: [ruby-talk:00539] A new discussion topic ;-)
> Date: Sun, 1 Aug 1999 12:41:15 +0200
> 
> [snip]
>>
>> What do you think?
>> 

[...]

> 
> In Ruby, we use class and Mix-in structures.  Now I get used to love
> it, and so can't imagine whether or not Self's way is suit for me.
> But there is one thing I had thought of, that is `temporal extend'.
> 
> In Self, objects have instance variables, and methods wrap them --I
> feel they are separated--.  In contrast with Self, Ruby's methods and

Hmmm :-/ I don't think so. As I have understood, you have slots in Self
objects. Slots may serve as data, or as method slots. If the serve as
data slots, you have to access them via sending messages to `self(that is, btw, how the name was born ;-). For example:

	obj = ( | ro_data = "I am readonly"
	          rw_data <- "And I am read/write" | )

You could access `ro_data' via `obj ro_data' and `rw_data' via 
`obj rw_data: 12'. It seems that there would be three methods
(`ro_data', `rw_data' and `rw_data:'), but that is not the case. Self
does handle that more efficient!

> instance vars are very strongly connected, I feel, except for the case
> of Mix-in modules.

I don't think, that Ruby's instance variables are stronger connected
than Self ones. But perhaps I have overseen something :-)

> 
> This reminds me the temporal extend:
> 

[interesting code deleted ...]

> 
> This is a little like Self's way, isn't it... Now `extend' is

Hmm! That would be so, if Self would really use methods to access
instance variables. But that is not so. Only the mechanism looks like
that.

> available in Ruby, but it leaves side effects. Methods are overrided.
> So I thought of temporal one, leaves no side effects.

I agree, such temporary extend could be useful :-)

> 
> Sorry, maybe your point is classes, and this is not.  However, in the
> case `temporal extend' is in need, Self's way is also useful, I think.
> (and vice versa ?)

My point was not classes, but objects. Why should classes be special
handled than objects. Every object, could be able to build instances
via `clone'! Why do we need classes at all? ;-)

> 
> Thanks,
> --

[...]

May I ask another question? Is there a way in Ruby to do the following:

	class Foo
	    def initialize(val)
	        @var = val
	    end
	end

	class Bar
	    def show_var
	        print "show_var=#{@var}\n"
	    end
	end

	foo = Foo.new("string")
	bar = Bar.new

	m1 = Bar.get_method_code(:show_var)
	m2 = bar.get_method_code(:show_var)

	foo.instance_eval &m1
	foo.instance_eval &m2

That should print:
=> show_var=string
   show_var=string

What I try to do, is to fetch the methods body (perhaps without the
context of the method) and execute it in another context.

Is there any way?

Thanks,
\cle

In This Thread