On 1/22/24 02:06, Marc Nieper-Wißkirchen wrote:> More and more, I have come to the conclusion that the
addition of the local defines to Scheme added a wart to the language long ago.
Speaking for GJS and Hal, I'll point out that the reason for local defines is pedagogical. The similarity between top-level and local defines makes it easy for students to grasp the concept without having to explain yet another binding mechanism. And since LETREC didn't exist at that time, it was a sensible choice.

I'd argue that it's still valuable. It's also something that both GJS and I use regularly and I generally find preferable to LETREC.

I also don't find the argument about continuation behavior particularly compelling. I have been using internal definitions for 40 years without once running into an issue with it; although admittedly I rarely use internal definitions for anything other than procedure definitions. It might be simpler to restrict what kinds of values can be used in those definitions than worrying about reused continuations.

Reply via email to