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
For example, Object::Set and ThreadSafeFunction::Release. They don't modify the object itself but only call functions on the N-API object they wrap. This is similar to how the constness of a pointer is orthogonal to the constness of the object it points to.
These methods being non-const means that if I have to call them in a lambda, I have to either capture the object by reference (unidiomatic and not always possible, e.g. with TheadSafeFunction) or mark the lambda as mutable (unusual and misleading since the lambda itself doesn't mutate).
The text was updated successfully, but these errors were encountered:
is adding const going to break any existing code (I'm expecting not)
Object::operator[] returns a different type depending on constness (Value or PropertyLValue), but PropertyLValue is implicitly convertible to Value, so I guess it's fine? 🤔
This issue is stale because it has been open many days with no activity. It will be closed soon unless the stale label is removed or a comment is made.
For example,
Object::Set
andThreadSafeFunction::Release
. They don't modify the object itself but only call functions on the N-API object they wrap. This is similar to how the constness of a pointer is orthogonal to the constness of the object it points to.These methods being non-const means that if I have to call them in a lambda, I have to either capture the object by reference (unidiomatic and not always possible, e.g. with TheadSafeFunction) or mark the lambda as
mutable
(unusual and misleading since the lambda itself doesn't mutate).The text was updated successfully, but these errors were encountered: