paul.annesley.cc

A quote from Guido van Rossum

23 February 2009

Although I had hoped to provide something similar in Python, it quickly became clear that such an approach would be impossible because there was no way to elegantly distinguish instance variables from local variables in a language without variable declarations.

— Guido van Rossum, The History of Python: Adding Support for User-defined Classes

            
            # The Greeter class
            class Greeter
              def initialize(name)
                @name = name.capitalize
              end 
              def salute
                puts "Hello #{@name}!"
              end
            end
            
            

— Ruby example, ruby-lang.org front page

Owned.