2 ms·
Serializing functions is an exciting footgun of pain due to capturing/closures. Sure there are plenty of places where you could serialize easily, it’s super eas
by olliej 5y ago
Serializing functions is an exciting footgun of pain due to capturing/closures. Sure there are plenty of places where you could serialize easily, it’s super easy to become nonserializable and you end up in a position where sometime a function serializes, and sometimes it fails. Then there are semantic issues in later execution as a lot of primitive operations are defined in terms of the host global object, etc.
So the safest option is to not support serialization.