top | item 47109233

(no title)

layla5alive | 8 days ago

u32AllocCount

u32AllocSumSizeInBytes

f32AllocAvgSizeInKBytes

Its easy to code review the interaction between these - the valid code almost writes itself from the names - lots of operations will just obviously read as wrong in ways that they may not with i.e. num_allocs, total_alloc and avg_alloc, or num, total, avg.

I find it useful to use statically typed variable names. My mental syntax checker benefits from the extra type metadata being embedded at each usage, reducing mental indirections/my reliance on the larger context and enabling me to quickly detect many types of mistakes via more efficient local reasoning.

discuss

order

No comments yet.