-
Notifications
You must be signed in to change notification settings - Fork 130
Closed
Description
There are some naming inconsistencies that have been bothering me for a while, and I'd like to solicit input for anyone who has some. There is a mix of free functions that return structures, and constructor methods on structs. Some examples:
- There's a free function
process::all_processes() -> ProcResult<Vec<Process>>to get all processes, but a methodProcess::new(pid) -> ProcResult<Process>to get a single process - There's a free function
cpuinfo() -> ProcResult<CpuInfo>to get CPU Info, but when getting memory info, you use a constructor methodMeminfo::new() -> ProcResult<MemInfo>
My personal inclination is to remove the number of free functions (except when necessary, because there's no struct to attach to. boot_time_secs() -> ProcResult<u64> is a good example of this), but I'm curious to know if anyone else has any thoughts on this
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels