Fixed DataView. #25
Conversation
|
hi! thanks for your PR. I have a few questions & notes, as this PR doesn't fit
what do you mean?
I'm not willing to switch to the For the |
|
Hi! Thanks for your feedback.
Accessor functions take a non-optional byteOffset parameter.
We have different definitions of zero-cost. To me, zero-cost means that abstractions are zero-cost. If a client wants to use an abstraction, it shouldn't cost more that hand-writing the JavaScript that implements that abstraction. In the PR, if a client don't want ConstrainedTypes, they can call the truncate/rounded/raw function and avoid the overhead. If they use a bundler like webpack, ConstrainedTypes wouldn't even be included in their bundle. If they want to avoid implicit conversions, and verify that they aren't doing implicit conversions, then ConstrainedTypes does this efficiently. If I understand your definition of zero-cost correctly, it's about not offering abstractions that don't exist in the JS standard library if using those abstractions has a cost. I disagree with this as a design objective. If a client wants the abstraction but doesn't have the option of using it, they either have to go without, and accept the possibility of introducing defects, or write it themselves, which costs engineering time. There aren't any benefits to counterbalance these costs. ConstrainedTypes offers significant value in my use-case. If I haven't persuaded you to change your mind here, it makes more sense for me to create a separate library that uses ConstrainedTypes than to work on this PR. I don't say this with hostility. This is about creating a binding that meets my needs.
Good point. Agreed. |
DataView
BigInt
Testing
Other