A structure is defined with `define-struct` in Intermediate Student Language.
Is it serializable? That is, can it be written and then re-read
successfully with `write` and `read`? If not, is there a way to make it so?
(I have found the function `make-serialize-info` in the racket/serialize
libra
Kind of. If this is about Universe programming (so that students can send
messages back and forth), I have them write conversion functions:
(define-struct hh (cakes henries))
(define (hh->lists hh)
(list (cakes->lists (hh-cakes hh)) (henries->lists (hh-henries hh
-- Matthias
On N
I think the conversion function is useful pedagogically to talk about
the need to serialize, but having it just work might be expedient in
other situations. I do not believe that they are actually
serializable, but we could fairly easily make that change.
On Sat, Nov 16, 2013 at 10:22 AM, Matthias
I have considered making them prefab instead
Sent from my iPhone
> On Nov 16, 2013, at 12:32 PM, Jay McCarthy wrote:
>
> I think the conversion function is useful pedagogically to talk about
> the need to serialize, but having it just work might be expedient in
> other situations. I do not be
I agree. Having the students write the marshalling and unmarshalling
functions is important when introducing them to DP. It also a great way to
demonstrate the importance inverse functions. Take a look at some of my
thoughts here:
http://faculty.cs.byu.edu/~jay/conferences/2013-tfp/proceedings/tfp2
> > [Are ISL structures made with define-struct serializable?]
>
> Kind of. If this is about Universe programming (so that students can send
> messages back and forth), I have them write conversion functions:
>
> (define-struct hh (cakes henries))
>
> (define (hh->lists hh)
>(list
6 matches
Mail list logo