You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A common pattern I like to use, when I have a package level constructor named New returning a factory object that itself creates some other object, is to use the child object's name as the name of the factory method that creates it.
In this case, instead of:
func (kr*Smokering) New(...
... you'd have:
func (kr*Smokering) Key(...
I've found that it can make things a lot clearer 6 months down the road (given that the word New is often grossly overloaded).
The text was updated successfully, but these errors were encountered:
Per your RFC in #reviews -- regarding:
smokering/smokering.go
Line 29 in c9e16dd
A common pattern I like to use, when I have a package level constructor named
New
returning a factory object that itself creates some other object, is to use the child object's name as the name of the factory method that creates it.In this case, instead of:
... you'd have:
I've found that it can make things a lot clearer 6 months down the road (given that the word
New
is often grossly overloaded).The text was updated successfully, but these errors were encountered: