3 ms·
A "simple rule" that's not programmatically enforced is just a convention, and conventions are too easily ignored. I'd be ok with a type-system based solution t
by yorwba 9y ago
A "simple rule" that's not programmatically enforced is just a convention, and conventions are too easily ignored. I'd be ok with a type-system based solution that distinguishes serializable and non-serializable types, but silently writing nondeserializable data is just asking for trouble down the road.
This language in particular is built around having value semantics for everything (e.g. writing to a database and reading back is guaranteed to result in an indistinguishable value); and that enables nice features like persisting the complete application state on disk, deterministic replay of logs and so on.
I think for the goals of this language, disallowing closures as data is a reasonable choice.
- nurettin 9y agoIt makes sense to enforce non-serialization using attributes, but then, closures should never be serialized, so you are where you started.