[#11073] segfault printing instruction sequence for iterator — <noreply@...>

Bugs item #10527, was opened at 2007-05-02 14:42

14 messages 2007/05/02
[#11142] Re: [ ruby-Bugs-10527 ] segfault printing instruction sequence for iterator — Nobuyoshi Nakada <nobu@...> 2007/05/10

Hi,

[#11188] Re: [ ruby-Bugs-10527 ] segfault printing instruction sequence for iterator — Paul Brannan <pbrannan@...> 2007/05/16

On Thu, May 10, 2007 at 04:51:18PM +0900, Nobuyoshi Nakada wrote:

[#11234] Planning to release 1.8.6 errata — Urabe Shyouhei <shyouhei@...>

Hi all.

17 messages 2007/05/25

Re: pattern for implementation-private constants?

From: David Flanagan <david@...>
Date: 2007-05-08 04:21:56 UTC
List: ruby-core #11111
Somehow, just not documenting the constants leaves me unsatisfied, 
though I admit that this is more of a theoretical than a practical matter.

Given that constants aren't actually required to be constant, anyway, 
I'm tempted to use class variables for the private ones instead...  In 
his response, murphy was kind enough to provide benchmarks showing the 
performance hit I'd take if I did this.

	David

Nathan Weizenbaum wrote:
> I believe there isn't a way, but I don't think it's really necessary. 
> Just exclude the constants from the documentation, and no one will use them.
> 
> - Nathan
> 
> On 5/7/07, *David Flanagan* <david@davidflanagan.com 
> <mailto:david@davidflanagan.com>> wrote:
> 
>     Hi,
> 
>     As far as I can tell (and I hope I'm not overlooking something
>     embarrassingly obvious) there is no way to define private constants in
>     Ruby.  It seems to me that class implementations often benefit from the
>     use of constants, but there is no need to expose many of these constants
>     as part of the public API.
> 
>     Has the community settled on any kind of pattern for dealing with this?
> 
>     The only one I can think of is to define methods whose names begin with
>     capital letters and therefore look like constants.  I don't like the
>     performance implications of that, however.
> 
>     Thank you for your insight!
> 
>             David Flanagan
> 
> 


In This Thread