[prev in list] [next in list] [prev in thread] [next in thread] 

List:       ruby-talk
Subject:    [ruby-talk:29910] Re: Ruby/Python: Software Engineering
From:       "Bjorn Pettersen" <BPettersen () NAREX ! com>
Date:       2001-12-31 23:09:18
[Download RAW message or body]

> From: Kyle Cordes [mailto:kyle@kylecordes.com] 
> 
> "Mathieu Bouchard" <matju@sympatico.ca> wrote in message 
> news:Pine.LNX.4.21.0112311600250.3187-100000@bartok...
> 
> > >     Enforced indention (you indent your own code I bet)
> 
> > That's a nice feature to save writing "end" all the time. But not
> having
> > to write "self" all the time is much more important to me.
> 
> That's always been a mystery to me... I enjoy Python's 
> terseness that comes from using indentation to describe 
> blocks, but it doesn't seem to reconcile with the (IMHO) 
> sillyness of writing self everywhere.

You need some way of disambiguating nested classes (how does Ruby do
this btw?):

  class Outer:
      def method1(self): pass
      def method2(self):
          class Inner:
              def innerMeth1(this): pass
              def innerMeth2(this):
                  self.method1()
                  this.innerMeth1()

Etc.

-- bjorn
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic