Closed nekohor closed 4 years ago
yes, golang‘s feature decides it! if programmer write it rightly, When user configure rules, they are unaware of this.
there is an example in golang :
type Person struct {
Age int
}
// it is not a ptr, when you call this func to change Person's Age, you will change nothing!
func (p Person)SetAge( a int){
p.Age = a
}
What you mean is that the barren programming language Golang lead to the compromise of user who have to use struct signature and method to wrap the abstraction of business.
in some conditions, almost what it means. but you can not only use struct ,but also you can directly inject functions or data without struct to do what you want,such as follow example:
Aoligei