mikolalysenko / mudb

Low latency state replication for the web

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Better primitive type checking

hediyi opened this issue · comments

Maybe better to check typeof identity instead of muType, coz we don't have control over the type name of user-defined schema types

take the example of the QuantizedScalar

No, the typeof identity is ambiguous. We should use mutype for this stuff.

i'm thinking something like type === 'number' || type === 'string' || type === 'boolean', how is this ambiguous?

In what context would the typeof syntax get checked?

If you are serializing an 8 bit vs 32 bit vs var int you'd use a different technique.

I see your point now. closing