| ▲ | pveierland 2 hours ago | |
When correctness is important I much prefer having strong types for most primitives, such that the name is focused on describing semantics of the use, and the type on how it is represented:
Where `parent` can then only be used to index a container of `FileNode` values via the `std::ops::Index` trait.Strong typing of primitives also help prevent bugs like mixing up parameter ordering etc. | ||
| ▲ | kqr 2 hours ago | parent [-] | |
I agree. Including the unit in the name is a form of Hungarian notation; useful when the language doesn't support defining custom types, but looks a little silly otherwise. | ||