chicken-hackers
[Top][All Lists]
Advanced

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

Re: [Chicken-hackers] [PATCH] Improve irregex matching performance a lot


From: Jörg F . Wittenberger
Subject: Re: [Chicken-hackers] [PATCH] Improve irregex matching performance a lot by adding two type declarations
Date: Mon, 14 Dec 2015 12:59:57 +0100
User-agent: Mozilla/5.0 (X11; Linux armv7l; rv:38.0) Gecko/20100101 Icedove/38.4.0

Am 12.12.2015 um 16:13 schrieb John Cowan:
> Peter Bex scripsit:
> 
>> Maybe this is a good feature to add: a way to indicate that a type
>> declaration for the argument types to a procedure declared elsewhere
>> should be considered an assumption in the procedure body.  This way
>> it would not only affect callers, but also the procedure itself, which
>> makes it easy to improve performance of portable libraries without
>> hacking them to pieces.
> 
> As an author of SRFIs, I strongly support this.  I don't think users of
> other Schemes want to read code littered with Chicken-specific (or
> Racket-specific) type information, even if judicious use of macros
> makes the type information disappear before their compilers or interpreters
> try to process it.  It's just as important for programs to communicate
> algorithms to other people as to their computers.

Frankly, I'd disagree.  IMHO any kind of type declaration is better than
none.  Be it comments, embedded in macros (like han egg does), whatever.
 For me it makes it much easier to understand the code.

Compiler-checked types just have the advantage that one advantage of
being automatically checked.

Besides: sometimes it happens that simply adding type declarations
catches bugs.

/Jörg



reply via email to

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