[racket-users] Can I hide a method in a trait?

2020-08-13 Thread Siyuan Chen
e can easily reuse it in other traits without worrying about name colliding (the name `helper` is very commonly used, imo) . 2. Compared with the "renaming" solution, "hiding" looks more "hygienic", because it can avoid further name colliding. PS: I admit this example ma

Re: [racket-users] Can Racket implement LockedMagicDoor example of MIXEDJAVA?

2020-08-13 Thread Siyuan Chen
the *name* of the auxiliary > hook method, using `define-member-name` etc. That avoids the problem of > needing the same *name* to refer to different "slots" at different points > in time; instead, just use two different names > Nice. Racket supports parameterizing identifiers

Re: [racket-users] Can Racket implement LockedMagicDoor example of MIXEDJAVA?

2020-08-12 Thread Siyuan Chen
acket that can simulate the semantics of MIXEDJAVA ? Thanks. Best regards, Siyuan Chen On Tue, Aug 11, 2020 at 10:09 PM Ryan Culpepper wrote: > I don't know of a way to solve that problem using the Racket class system > alone, but here is a solution that uses traits instead, which allow you

[racket-users] Can Racket implement LockedMagicDoor example of MIXEDJAVA?

2020-08-09 Thread Siyuan Chen
behavior of MIXEDJAVA, but I don't know how to do it. Notice that in the paper, "Super and Inner — Together at Last!" by David S. Goldberg, Robert Bruce Findler and Matthew Flatt, the authors originally used `beta` and `java` to mark the methods, no need `pubment` a method first. In that model,

Re: [racket-users] Is it possible to simulate FEXPRs in Racket?

2020-06-09 Thread Siyuan Chen
o 5)]) '(make-Just (+ x y ``` I was surprised that it works. PS: The code above can be compiled and run in guile 2.2.3. You can test it at https://rextester.com/l/scheme_online_compiler, if someone interested, Best regards, Siyuan Chen On Mon, Jun 8, 2020 at 12:23 AM Jens Axel Søgaard wr

[racket-users] Is it possible to simulate FEXPRs in Racket?

2020-06-07 Thread Siyuan Chen
`namespace-set-variable-value!` is a mutable function which is not suitable as well. Could someone give me some advice? Or we can modify the code above to make it work in Racket. Very thanks. Best regards, Siyuan Chen -- You received this message because you are subscribed to the Google Groups "

Re: [racket-users] Is there any way to redefine printf in main.rkt ?

2019-04-01 Thread Siyuan Chen
Dear George, I have just found a way to solve this problem. Use (current-output-port out). But still very thank you. On Tue, Apr 2, 2019 at 1:30 AM George Neuner wrote: > > On 4/1/2019 1:09 PM, Siyuan Chen wrote: > > Dear George, > > > > This means we must