This repository has been archived by the owner on Aug 2, 2023. It is now read-only.
This repository has been archived by the owner on Aug 2, 2023. It is now read-only.
Lots of avoidable imported package name shadowing #42
Open
Description
The vm
receiver and argument name for v53
type is unfortunate as it's used in pair with vm
package. When you have vm
variable in scope, one can't access vm
package.
It could be OK to rename vm
to v
, for example.
Simple example of shadowing is:
func (vm *v53) trace(instr vm.Instr) {
if vm.thread().global.config.debug {
fmt.Printf("vm @ ip=%02d fp=%02d: %v\n",
vm.thread().frame().pc,
vm.thread().frame().depth,
instr,
)
}
}
Method gets vm
receiver and refers to vm
package in it's arguments list.
If function body will ever need something from that package, it would be an unpleasant experience to have.
Metadata
Assignees
Labels
No labels
Activity