develooper Front page | perl.perl6.internals | Postings from July 2002

Re: [PATCH] .dev files.

Thread Previous | Thread Next
Dave Mitchell
July 17, 2002 15:51
Re: [PATCH] .dev files.
Message ID:
On Wed, Jul 17, 2002 at 11:13:58PM +0100, Nicholas Clark wrote:
> On Wed, Jul 17, 2002 at 10:38:47PM +0100, Dave Mitchell wrote:
> > One of the reasons I used numerical accuracy as an example was because
> > in Perl 5, Nick's mini-essay on his stirling work *is* buried somewhere
> > in the middle of the 10,000 line sv.c, and thus probably hasn't been seen
> > by most people. If there was a .dev file, it would (hopefully) become a
> > well-known starting point and thus things in it would more likely be
> > drawn to the attention of the reader earlier.
> Hmm. But you're right too. I want them in both places.
> Well, more accurately, I think I'd agree that the overview documentation
> deserves not to be in sv.c, but all the "don't do this here" or "you don't
> need to worry about that here" stay inline. I *think* that means I'd like
> comments such as this:
> 		/* IV not precise.  No need to convert from PV, as NV
> 		   conversion would already have cached IV if it detected
> 		   that PV->IV would be better than PV->NV->IV
> 		   flags already correct - don't set public IOK.  */
> to stay where they are, but the description (and health warning) maybe
> should come out.

Yep, that sounds about right. People would learn from the .dev file
about your overall strategy to keep values as 64-bit ints for as long as
possible, then could learn about the individual gruesome hacks^w^w
cunning manipulations near the individual functions.

> I guess the distinction should be that in perl5, sv.c
> does lots of things, and that description needs to stay together with the
> numeric conversion code. If the numeric conversion code got to live in its
> own file, then sv_convert.c and would make sense, as it
> ought to be obvious to anyone fundamentally chaining sv_convert.c that they
> had better look at and correct
> It's just that as is, perl5's would have essays on SV allocation
> strategies, SV copying routines, SV number conversion, SV string conversion,
> SV setting routines (there are a lot of variants of these), magic, recycling
> unused SVs, SV string comparison, sv_gets, sprintf and cloning. And that
> list may not be complete. I had no idea so much was in there.

But better for there to be 15 essays than no essays :-)

"Do not dabble in paradox, Edward, it puts you in danger of fortuitous
wit." Lady Croom - Arcadia

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About