![]() | This article is rated Stub-class on Wikipedia's content assessment scale. It is of interest to the following WikiProjects: | |||||||||||||||||
|
Explain `bwp-object?`
editAs someone with cursory Scheme experience, I was delighted to be able to understand this whole page top to bottom until I hit the acronym BWP. Looking it up, it stands for broker weak pointer, comes from Chez Scheme (maybe used elsewhere?), and the details can be inferred better from there. It feels to me like a hole in the example's abstraction from the underlying implementation of Scheme. I don't have the background or skill to say wether it's possible to reimplement it in clear terms as an additional function, but believe that would improve the example for a broader audience, and even just a comment expanding the acronym would be a start. 24.113.171.200 (talk) 02:55, 12 August 2022 (UTC)
- The whole example would be more accessible in an ALGOL-like pseudocode (e.g. Python or pseudo-Python). 74.73.228.182 (talk) 21:36, 22 August 2024 (UTC)
bwp-object?
comes from Chez Scheme v8. I've updated the introductory paragraph of the example to note what it does, because I tripped up on that too. I don't know wheremake-weak-vector
comes from, and I'm not clear on why the example uses that instead of justweak-cons
; probably someone more familiar with Chez Scheme than I am should see if that can be cleaned up a bit. But I have the feeling that this example is not just beyond my understanding but wrong: it looks to me as if, if there's no entry in the cache table for those args, it does not apply the proc and enter the result in the table but simply returns#f
. ((bwp-object? #f)
appears to me to evaluate to#f
: the docs say "#t
if obj is the broken weak-pair object,#f
otherwise"- Cjs (talk) 08:01, 9 August 2025 (UTC)