near / borsh-rs

Rust implementation of Binary Object Representation Serializer for Hashing
https://borsh.io/
Apache License 2.0
299 stars 65 forks source link

Rename declarations (tuples, `nil`, `string`, `nonzero_xx` and arrays) #231

Closed dj8yfo closed 11 months ago

dj8yfo commented 11 months ago
mina86 commented 11 months ago

I do have draft commits for those changes so can send PRs soonish for that.

There’s actually more naming changes that I’ve been wondering about though they are a bit philosophical, i.e. it depends what the purpose of borsh schema is. Is it supposed to represent how the Rust type looks or just describe the binary format. The name changes I have in mind are:

And this all leads to further questions about keeping field names when describing structs and variant names when describing enums.

dj8yfo commented 11 months ago

The logic for renaming Tuple<...> and Array<...> is to be distinct from what would be derived for a generic struct named Tuple or Array

dj8yfo commented 11 months ago

taking following subtasks for resolution in scope of one pr

dj8yfo commented 11 months ago

taking following subtask for resolution in scope of one pr:

dj8yfo commented 11 months ago

taking following subtask for resolution in scope of one pr: