Re: [racket-users] Arbitrary property types on structs?

2020-03-25 Thread David Storrs
Got it. I'm actually relieved that this isn't possible, since it means I wasn't simply being dumb. On Wed, Mar 25, 2020, 7:41 PM Sam Phillips wrote: > On 2020-03-25 14:16, David Storrs wrote: > > This would let me use a struct as an output port: > > > > (struct foo (name out) #:property

Re: [racket-users] Arbitrary property types on structs?

2020-03-25 Thread Sam Phillips
On 2020-03-25 14:16, David Storrs wrote: This would let me use a struct as an output port: (struct foo (name out) #:property prop:output-port (struct-field-index out)) I'd like to be able to set up a struct such that I can use it as a UDP socket, something like the following pseudo-code:

[racket-users] Arbitrary property types on structs?

2020-03-25 Thread David Storrs
This would let me use a struct as an output port: (struct foo (name out) #:property prop:output-port (struct-field-index out)) I'd like to be able to set up a struct such that I can use it as a UDP socket, something like the following pseudo-code: (struct foo (socket) #:property prop:udp