Viktor Nikolaiev

Results 6 comments of Viktor Nikolaiev

I achieved this with the following ``` trait Positioned { var startPos:Int = -6 var endPos:Int = -1 def setPos(start:Int = this.startPos, end:Int = this.endPos): this.type = { this.startPos =...

@atdiar I agree that I picked a bad example to demonstrate the issue. It's much more logical to have a pointer to the user object. Still, there are cases where...

@seankhliao I understand your example, and you're right. It's potentially dangerous and error-prone to store pointers to slice elements. This is true regardless of method used to iterate the slice,...

@apparentlymart > add a go vet rule for any case where some part of a loop-local variable is written to and then not subsequently read This sounds very good to...

I am closing this in favor of #69345 and @apparentlymart suggestion