chicken-hackers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Chicken-hackers] substring function and bounds checks


From: Alex Shinn
Subject: Re: [Chicken-hackers] substring function and bounds checks
Date: Fri, 8 Feb 2013 13:43:10 +0900

On Fri, Feb 8, 2013 at 12:26 PM, John Cowan <address@hidden> wrote:
Alex Shinn scripsit:

> The warning is important, and this again emphasizes that there
> are two _unrelated_ functions - extraction and truncation - and
> that combining them is a bad idea.

The warning is important -- when it's important.  In my case, it was
important to avoid cluttering the exception log with spurious complaints
about the results of a process outside anyone's control.

Then comment out the logging, or use a verbosity level.  The most
important thing with a hacky language and hacky formats is to be precise
about your parsing.

In any case, that has zero to do with whether it makes sense to package
this behavior as a procedural abstraction.  Please note that I am *not*
arguing that Chicken's substring should behave this way, just that a
convenient implementation of the loose behavior does have use cases.

I think none of the Schemers are arguing that substring should be changed.

I'm arguing further that the slice function is an artifact of languages that
have slicing as syntax, but here is actually a confused composition of two
operations.  The only example provided was fairly obscure and it was
indeed a composition, even if you don't think it's worth separating them
for logging or other handling.

-- 
Alex


reply via email to

[Prev in Thread] Current Thread [Next in Thread]