[#688] mkmf.rb - add files to clean and distclean targets — Michal Rokos <michal@...>

Hi,

25 messages 2003/01/15
[#722] Re: [RFC] mkmf.rb - add files to clean and distclean targets — Mathieu Bouchard <matju@...> 2003/01/20

On Thu, 16 Jan 2003, Michal Rokos wrote:

[#740] Re: [RFC] mkmf.rb - add files to clean and distclean targets — matz@... (Yukihiro Matsumoto) 2003/01/21

Hi,

[#724] Symbols: More Functionality Wanted — Ryan Pavlik <rpav@...>

I've been discussing this for a bit on #ruby-lang on OPN (or freenode or

23 messages 2003/01/20
[#728] Re: Symbols: More Functionality Wanted — matz@... (Yukihiro Matsumoto) 2003/01/20

Hi,

[#743] Re: Symbols: More Functionality Wanted — "Pit Capitain" <pit@...> 2003/01/21

On 20 Jan 2003 at 15:49, Yukihiro Matsumoto wrote:

[#767] Re: Symbols: More Functionality Wanted — Mathieu Bouchard <matju@...> 2003/01/22

[#768] Re: Symbols: More Functionality Wanted — dblack@... 2003/01/22

Hi --

[#779] Re: Symbols: More Functionality Wanted — Gavin Sinclair <gsinclair@...> 2003/01/23

On Thursday, January 23, 2003, 6:28:04 AM, dblack wrote:

Re: Symbols: More Functionality Wanted

From: matz@... (Yukihiro Matsumoto)
Date: 2003-01-20 06:49:27 UTC
List: ruby-core #728
Hi,

In message "Symbols: More Functionality Wanted"
    on 03/01/20, Ryan Pavlik <rpav@nwlink.com> writes:

|I've been discussing this for a bit on #ruby-lang on OPN (or freenode or
|whatever), and am going to post it here, per suggestion.
|
|Basically, the Symbol class should have more useful functionality.  One
|should not have to do the following:
|
|    @a  = 1
|    str = "@a"
|    val = eval(str)
|
|Especially when we've got a perfectly wonderful Symbol class which is
|not only there, but used internally for just this purpose.  I'd like to
|see the following:
|
|    @a  = 1
|    sym = :@a
|    val = sym.binding      # Or whatever... pick your favorite name ;)
|
|More importantly:
|
|    @a  = 1
|    sym = :@a
|    sym.bind(2)
|    p @a                   # => 2
|
|This has multiple advantages: 
|
|    *  It's more efficient.
|    *  eval() sucks anyway.  :-)
|    *  It allows rebinding variables dynamically
|    *  Symbols become useful in ruby code
|    *  All the internal calls are already there... like rb_ivar_set,
|       rb_ivar_get, and these all take IDs (which can be taken directly
|       from the symbol)

Interesting idea, but I feel like they are responsibility of Binding,
not Symbol.  For example,

  b = binding()
  b.bind(:a, 2)
  b.value(:a)
  
							matz.

In This Thread