A parameter object itself is essentially just a key. To get its value, you first look up the current parameterization in the current continuation's continuation-marks. The parameterization contains an immutable eq?-hash mapping parameter keys to thread cells. The parameter's value is the value of the thread cell in the current thread. Setting the parameter mutates the thread cell, but using parameterize with the parameter remaps the parameter to a new thread cell. (Actually, a parameter stores its initial thread cell, so a parameterization's size is limited to the number of distinct parameterized parameters, not the number of all created parameters.)
The Racket CS implementation of parameters is here: https://github.com/racket/racket/blob/master/racket/src/cs/rumble/parameter.ss . Ryan On Mon, Mar 2, 2020 at 6:45 PM Hendrik Boom <hend...@topoi.pooq.com> wrote: > How are parameters implemented. My conceptial model is an association > list (like in the original Lisp 1.5 manuel) would suffice, but that can > lead to long searches. > > What is actually done in Racket? > > -- hendrik > > -- > You received this message because you are subscribed to the Google Groups > "Racket Users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to racket-users+unsubscr...@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/racket-users/20200302174453.7lpltlzivo6iids7%40topoi.pooq.com > . > -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to racket-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/racket-users/CANy33qmDdW%3DoGKboLV5SS0AjxRUMpJB0uVdSonEs2C5MMc4QFA%40mail.gmail.com.