From: Ray Dillinger <[email protected]> Subject: Re: [r6rs-discuss] What's under the hood? Date: Mon, 28 Sep 2009 20:10:27 -0700
> None of these options are pretty. I think "consume all memory and > crash" is the worst of them, so I don't want to wind up using > bignums (particularly big ratios) accidentally. I definitely > want the ability to request a signal if I exceed fixnum bounds in > my integer calculations, especially including the numerators and > denominators of ratios. OTOH I don't want the result got silently become innacurate, or to find out in the next morning that the program I was running overnight stopped on debugger saying the intermediate calculation overflowed fixnum. I think it's not really a language issue per se, but more of an environment issue. Each application, or even each run, needs different preferences. During development cycle with dataset that won't need much bignums you may set the benavior to signal the overflow, then with bigger dataset you switch to full-bignum mode, for example. I've experienced a similar trade off with recursion limits. Some implementations limit the depth of recursions. Others allow arbitrary number of recursions until all heap is exhausted. Gauche is the latter and usually I'm happy with it, but in the early development cycle, sometimes I put a stupid bug that caused infinite recursion and have to frantically type Ctrl-C while watching all other processes are swapped out. So I wonder a runtime option that signals when various resource usages exceeds certain limit might be handy. It might be nice to have a standard way for programmers to state such preferences (pragma? declare?). Maybe not in Thing One, but could be in Thing Two. --shiro _______________________________________________ r6rs-discuss mailing list [email protected] http://lists.r6rs.org/cgi-bin/mailman/listinfo/r6rs-discuss
