in reply to Closure objects with public, private, and protected fields

Enforcing protection makes many nice hacks very hard, or even impossible. That's very unfortunate, in a highly dynamic language, in my opinion. I choose to trust the caller to know what the underscore means. If anyone wants to call my "private" or "protected" methods, they can go ahead. But they have been warned (by the underscore and/or (lack of) documentation).

Juerd # { site => 'juerd.nl', plp_site => 'plp.juerd.nl', do_not_use => 'spamtrap' }

  • Comment on Re: Working with public, private, and protected fields

Replies are listed 'Best First'.
Re^2: Working with public, private, and protected fields
by borisz (Canon) on Mar 04, 2006 at 22:56 UTC
    If I could, I would vote 10 times for this great answer. I can not agree more. Juerd++.
    Boris
Re^2: Working with public, private, and protected fields
by Anonymous Monk on Mar 06, 2006 at 21:58 UTC
    But they have been warned (by the underscore and/or (lack of) documentation).

    Unfortunately, lack of documentation doesn't guarantee a feature isn't used. :-(

    --
    Ytrew