[racket] serialization of math/array
On 07/16/2014 10:25 AM, Berthold Bäuml wrote:
> Hi,
>
> will there be serialization support for math/array and math/matrix in the near future? As far as I understand in principle it should be possible at leas in a straight forward way as there are already the routines array->list and list->array.
Sorry it's taken so long to reply. Part of the problem is that
`racket/serialize` isn't typed:
#lang typed/racket
> (require racket/serialize)
> serialize
Type Checker: missing type for identifier;
consider using `require/typed' to import it
identifier: serialize
from module: racket/serialize in: serialize
This and the fact that the array struct types are declared in Typed
Racket makes adding serialization tricky at best. Also, it would only
work in untyped Racket.
Generally, deserializing is hard to make type-safe, and nobody has taken
it up yet for Typed Racket. Occurrence typing should help, but would
require `deserialize` to take a predicate argument (like the second
argument to `list*->array`), which it currently doesn't do.
Neil ⊥