循环类的包名称
我编写了一个执行异步循环的类。它需要一个包名称。我已经有一个 util 包,但不愿意将一半的类放入该包中。如果它真的属于那里,我会把它放在那里,但如果我能找到一个更合适/具体的包,我会感觉好多了。你怎么认为?
I wrote a class that performs an asynchronous loop. It needs a package name. I already have a util package, but feel resistant to put half of my classes in that package. If it really belongs there, I'll put it there, but I'd feel much better if I can find a more appropriate/specific package. What do you think?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
peach
表示并行每个。无耻地从 Ruby 项目同名窃取。
peach
for parallel each.Shamelessly stolen from the Ruby project with the same name.
一个包通常是为多个类创建的。如果你的类使用了一些辅助类,那么它应该放在一个单独的包中;不同的是,您应该使用已有的通用包。
A package is normally created for more than one class. If your class uses some helper classes, then it should go in a separate package; differently, you should use the generic package you already have.
在发现与计时器包中的 Timer 类有许多相似之处后,我最终选择了“timer”作为包名称。
I ended up going with "timer" as the package name after finding many similarities with the Timer class that sits in the timer package.