From: MikkelFJ Date: 2001-08-04T19:10:51+09:00 Subject: [ruby-talk:19121] Something nicer than @? One of the things I like least about Ruby is they way @ spoils otherwise clean code visually. Ruby is almost like an algorithmic specification from a textbook, except for the @ in many places. I suggest that we try to find a cleaner syntax for handling scope object scope and class scope. One suggestion, that is harder to parse, is to use postfix ' There is a conflict with strings, but using postfix (as opposed to prefix) might make it work. x' instead of @x and x'' instead of @@x class Point def initialize x x' = x y' = y last_x'' = x' last_y'' = y' end end I have also considered . prefix, but that will not work when passing parameters. ::x, ..y means something different. Instead of @@x we could use class.x or shared.x similar to self.x. This is more verbose, but class members are used less frequently and the approach makes the code more readable. 'shared' as opposed to 'class' avoids possible parse conflict with class definition, but it shouldn't really be a problem. class Point def initialize x y .x = x .y = y class.last_x = .x class.last_y = .y end def clone new Point .x .y # bad end def clone2 new Point .x, .y # ok end end class Point def initialize x y :x = x :y = y shared.last_x = :x shared.last_y = :y end end Mikkel