SRFI 229: Tagged Procedures
Arthur A. Gleckler
(31 Aug 2021 22:36 UTC)
|
tagged procedures vs procedure properties
Per Bothner
(31 Aug 2021 22:54 UTC)
|
Re: tagged procedures vs procedure properties
John Cowan
(31 Aug 2021 23:55 UTC)
|
Re: tagged procedures vs procedure properties
Shiro Kawai
(01 Sep 2021 01:20 UTC)
|
Re: tagged procedures vs procedure properties
Per Bothner
(01 Sep 2021 01:57 UTC)
|
Re: tagged procedures vs procedure properties
Shiro Kawai
(01 Sep 2021 02:49 UTC)
|
Re: tagged procedures vs procedure properties
Marc Nieper-Wißkirchen
(01 Sep 2021 07:32 UTC)
|
Re: tagged procedures vs procedure properties Per Bothner (02 Sep 2021 15:49 UTC)
|
Re: tagged procedures vs procedure properties
Marc Nieper-Wißkirchen
(02 Sep 2021 16:26 UTC)
|
Re: tagged procedures vs procedure properties Per Bothner 02 Sep 2021 15:48 UTC
I see two semi-orthogical concerns: (1) Should one be able associate arbitrary (usually named) properties with a procedure, or just a single tag (which could be a property list)? The former can be built on top of the latter, but there is a problem with composability: Multiple libraries may want to associate different kinds of properties with procedures. How should they avoid stepping on top of each other? Procedure properties is a simple and proven way to do that. OTOH a simple tag might be more efficient in some cases. (2) Should you be able to associate properties or a tag with any procedure value or only a subset of procedure values? The former is conceptually simpler, but may make some optimizations difficult and/or require more changes to existing implementations. Maybe instead of: (lambda/tag tag-expression formals body) something like: (lambda/object formals body) or: (procedure/object procedure) These are functionally equivalent: (procedure/object procedure) === (lambda/object formals (apply procedure formals)) (lambda/object formals body) === (procedure/object (lambda formals body)) The result from procedure/object has all the behavior of the argument procedure, but it has object identity (eq? is guaranteed to distinguish different results), plus it is a valid argument to set-procedure-property! -- --Per Bothner xxxxxx@bothner.com http://per.bothner.com/