tag:blogger.com,1999:blog-6454006.post6033762872619978714..comments2024-01-16T14:32:49.175+00:00Comments on Arcane Sentiment: Special behaviour for interactive redefinitionsArcane Sentimenthttp://www.blogger.com/profile/04144052171693893368noreply@blogger.comBlogger4125tag:blogger.com,1999:blog-6454006.post-13111926701744959292012-04-29T03:45:25.878+00:002012-04-29T03:45:25.878+00:00Redefinition works if the first definition was at ...Redefinition works if the first definition was at the REPL, but not if it was in the definition pane. In that case it gives a "define-values: cannot redefine a constant: a" error — unless there was an assignment to the variable somewhere, in which case it also works. <a href="https://groups.google.com/forum/?fromgroups#!topic/racket-users/JXB6NR59UDs" rel="nofollow">Apparently</a> Racket actually <i>does</i> support redefinition, but as an optimization it infers constancy, and forbids assignment and redefinition of constants. This optimization appears to be turned off when I switch to R5RS by Choose Language (but not, oddly, by #lang r5rs); then anything is redefinable.<br /><br />So Racket could support dynamic redefinition and C-M-x (which is what I really miss) by simply turning off this optimization for code loaded from the definition pane.Arcane Sentimenthttps://www.blogger.com/profile/04144052171693893368noreply@blogger.comtag:blogger.com,1999:blog-6454006.post-32907340236669107632012-04-29T02:09:07.760+00:002012-04-29T02:09:07.760+00:00I just started the Racket 5.1.3 REPL and typed (de...I just started the Racket 5.1.3 REPL and typed (define a 32) (define a 33). No error message, and a evaluates to 33.John Cowanhttps://www.blogger.com/profile/11452247999156925669noreply@blogger.comtag:blogger.com,1999:blog-6454006.post-9942823383519161962011-08-20T12:20:56.694+00:002011-08-20T12:20:56.694+00:00I definitely miss redefinition in Racket. This is ...I definitely miss redefinition in Racket. This is one of the things that make me give up in frustration every time I try to use it. A REPL that won't let you change anything is only half a REPL.Arcane Sentimenthttps://www.blogger.com/profile/04144052171693893368noreply@blogger.comtag:blogger.com,1999:blog-6454006.post-10933813539096088392011-08-19T17:40:55.407+00:002011-08-19T17:40:55.407+00:00I don't really have a point, but I want to add...I don't really have a point, but I want to add a note: because of all the issues brought up in the post, in PLT Scheme (Racket), they have expressly decided *not* to allow redefinition. <br /><br />They claim not to miss the feature at all, and that the simpler evaluation model also makes it easier to use, particularly for pedagogical uses.Duncanhttps://www.blogger.com/profile/13843763027842460609noreply@blogger.com