You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Come to think of it, we really ought to be using Number as the return type of read, since you can read a Double{BE,LE} or a Float{BE,LE} out of a Buffer, and clearly any integer type is unsuitable for that. Using Number as the return type addresses the UInt32 issue too. Since these libraries are meant to be low-level bindings, I think the loss of convenience is acceptable.
Activity
hdgarrood commentedon May 3, 2018
Yes, we should have these functions use a
UInttype. I'd rather it be incontribif we're going to depend on it in this library, though.matthewleon commentedon May 3, 2018
Makes sense. I'd be happy to see it make its way into
contrib.hdgarrood commentedon Dec 30, 2018
Come to think of it, we really ought to be using
Numberas the return type ofread, since you canreadaDouble{BE,LE}or aFloat{BE,LE}out of aBuffer, and clearly any integer type is unsuitable for that. UsingNumberas the return type addresses theUInt32issue too. Since these libraries are meant to be low-level bindings, I think the loss of convenience is acceptable.[-]UInt32 operations: chaos reigns[/-][+]Use Number instead of Int for `read`[/+]Use Number for reading and writing, fixes #25
Merge pull request #35 from purescript-node/number-read-write