Loading ...
Sorry, an error occurred while loading the content.

1899Re: Re: Perl 5 TNG

Expand Messages
  • Shlomi Fish
    Feb 11, 2002
    • 0 Attachment
      On Tue, 12 Feb 2002, Adi Stav wrote:

      > On Tue, Feb 12, 2002 at 08:55:33AM +0200, Shlomi Fish wrote:
      > > On Tue, 12 Feb 2002, Omer Zak wrote:
      > >
      > > > I don't think that it is a bad idea to associate objects with files. Java
      > > > does the same, too. But the idea of on_destroy() is cool. Of course, it
      > > > works cleanly only with automatic variables. With dynamically allocated
      > > > variables (especially in garbage collected environments), destructors are
      > > > awkward - you can't be sure when does the object really get destroyed
      > > > (unless you invoke do_garbage_collection_now()).
      > > >
      > >
      > > The problem is that Python does not associate objects with files, and that
      > > way an OOP program can be self-contained, which is not the case for files.
      > > Likewise for Scheme and Stklos. I believe the Python/Scheme approach fits
      > > Perl more than Java's.
      >
      > I'm not sure what you mean by "associate objects with files". The
      > Python language has no special construct for files, they are treated
      > as objects, but they are built-in types, so in pre-2.2 you cannot
      > inherit from them (like string, list, dictionary, and so forth).
      >

      I meant that there can be several class definitions in the same module. I
      did not mean file handles.

      Regards,

      Shlomi Fish


      >
      > To unsubscribe from this group, send an email to:
      > hackers-il-unsubscribe@egroups.com
      >
      >
      >
      > Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
      >
      >



      ----------------------------------------------------------------------
      Shlomi Fish shlomif@...
      Home Page: http://t2.technion.ac.il/~shlomif/
      Home E-mail: shlomif@...

      "Let's suppose you have a table with 2^n cups..."
      "Wait a second - is n a natural number?"
    • Show all 14 messages in this topic