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
{{ message }}
This repository has been archived by the owner on Apr 9, 2020. It is now read-only.
Having the word array in the function name would make it clear that this is what it is used for. Trying to remember the name without that help is harder given that a search for array does not find it. Note that all of the map functions have map in them. i.e. cn_cbor_mapget_int.
For complete consistency with maps it really out to be cn_cbor_arrayget_index, but that seems not to be correct.
The text was updated successfully, but these errors were encountered:
+1 for a rename, but i'd suggest that we redo them all at the same time. I suggest: namespace_class_operation. The namespace is currently "cn_cbor", the class is "array" or "map", and the operations could be string_get, int_set, and append. We could shorten the namespace to "cnc" if we wanted slightly shorter names. This would give:
cnc_map_int_get, cnc_map_string_get (get_string sounds like we're returning a string to me)
cnc_array_int_get
Anything we do here is a breaking API change, so we may as well fix everything at once and rev the major version number.
Yes, I actually ended up writing what would be cnc_array_int_set because it was going to be easier for me to do work where position in the array was important as well.
Having the word array in the function name would make it clear that this is what it is used for. Trying to remember the name without that help is harder given that a search for array does not find it. Note that all of the map functions have map in them. i.e. cn_cbor_mapget_int.
For complete consistency with maps it really out to be cn_cbor_arrayget_index, but that seems not to be correct.
The text was updated successfully, but these errors were encountered: