private variables (again) 
Author Message
 private variables (again)

I found some old threads on this topic so I'm probably belaboring the
point but sorry I can't resist ...

I find it *very* odd that private instance variables don't exist in
Ruby, considering private/protected/public levels exist for methods.


by any subclass of A.

Ruby needs to implement variable hiding (or something similar) if it
is to gain more public acceptance.  I feel that many programmers (I
have in mind mainly C++ programmers) will consider Ruby's behavior too
dangerous and avoid Ruby because of it.

Python has the ugly __x --> __ClassA_x mangling convention which does
not hide the variable but at least provides some level of protection.

Can someone give an update on this topic?  I saw it being discussed
with some proposed solutions but I didn't see any decisions made.

I am quite willing to dig into the source and help implement an
agreed-upon solution.

--Matt



Sun, 03 Oct 2004 19:46:39 GMT  
 private variables (again)
Hi,

In message "private variables (again)"

|I find it *very* odd that private instance variables don't exist in
|Ruby, considering private/protected/public levels exist for methods.
|

|by any subclass of A.

It's in the ToDo list.  But it is little bit difficult to implement.
Stay tuned.

                                                        matz.



Sun, 03 Oct 2004 23:32:19 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Scheme vs ML again and again and again and again

2. Scheme vs ML again and again and again and again

3. PRIVATE variables (was parameters)

4. Lots of Public and Private variables - no penalties on modern PC.

5. Public\private memory variables

6. Private variables can be changed outsid e?

7. Private variables can be changed outside?

8. Making Instace Variables Private/Local

9. Private instance variables

10. private variables

11. private variable

12. cant see PRIVATE variable in MODULE SUBROUTINE when debugging with IFC/IDB v7.1

 

 
Powered by phpBB® Forum Software